Hi. I am working in UTF-8 mode, but I need to export data to a TXT file in ASCII, regarding spanish chars as Ñ,ñ,á,é,í,ó,ú, , etc.
Is there a way to acomplish this in OI 7.1?. I have seen UTF8_ANSI, and ANSI_UTF8, but I don't see any ANSI_ASCII or UTF8_ASCII.
Enrique,
Use UTF8_ANSI and then use the CharToOem Windows API function to convert to your basic Arev-style ASCII string.
World Leaders in all things RevSoft
We use OemToChar
(BOOL OemToChar( LPCSTR lpszSrc,
LPTSTR lpszDst);
and CharToOem
BOOL CharToOem( LPCTSTR lpszSrc,
LPSTR lpszDst);
exported out of USER32
The Sprezzatura Group Web Site
World Leaders in all things RevSoft
Next time we call across the office
The Sprezzatura Group Web Site
World Leaders in all things RevSoft
Snap! :)
Thanks!. I will try this. Actually, I was temporarily solving it by first converting to ANSI, and then mapping hexa ANSIs to hexa ASCII using convert. But this has to be done taking into account every single char that may appear!.
Sorry, I didn't understand the "Next time we call across the office"
We both posted the same response within 20 seconds - it would have been better if only one of us posted, so we could have called out "I'm answering Enrique noone else bother".
The Sprezzatura Group Web Site
World Leaders in all things RevSoft
OK. It is always good to have people fighting over to answer your post first!. I will give you both another chance to win soon, and we will see who is the best…