Error disabling UNICODE 
Author Message
 Error disabling UNICODE

I'm developing a PocketPC app targeting WinCE 3.0
I have a text file with comma seperated strings which I
want to load and parse out the strings using strtok(). It
works fine, but then I go to add the strings into a List
Box control, and it the text comes out as squares. I
narrowed the problem down to the fact that the system is
expecting a wide char (unicode) string passed to it, and
I'm using ASCII 8 bit chars. Upon looking in the project
settings in the preprocessor area, I found "/D UNICODE"
and "/D _UNICODE". Obviously this means it's using UNICODE
and the Windows API defines 2 flavors of functions, for
example: MessageBoxA, and MessageBoxW. The A version
accepts 8 bit ASCII strings, and the W version takes Wide
char unicode characters. When UNICODE is defined by
preprocessor or in code, normal function calls default to
the W version.

So I thought that by removing the "/D UNICODE" definitions
the system would default to ASCII. But when I go to build
my app, the linker complains about unresolved symbols,
specifically function names with the letter A at the end,
for example: MessageBoxA(), unresolved external symbol.

So are the PocketPC libs unicode only or is there a way to
use ACSII?



Sat, 05 Jun 2004 00:59:28 GMT  
 Error disabling UNICODE
Unicode is the basic character type in Windows CE.  Don't change the project
settings for that.  When you want to take your ASCII string and display it
in a listbox, convert it to Unicode first, using MultiByteToWideChar (or any
of the other conversion functions).

Paul T.


Quote:
> I'm developing a PocketPC app targeting WinCE 3.0
> I have a text file with comma seperated strings which I
> want to load and parse out the strings using strtok(). It
> works fine, but then I go to add the strings into a List
> Box control, and it the text comes out as squares. I
> narrowed the problem down to the fact that the system is
> expecting a wide char (unicode) string passed to it, and
> I'm using ASCII 8 bit chars. Upon looking in the project
> settings in the preprocessor area, I found "/D UNICODE"
> and "/D _UNICODE". Obviously this means it's using UNICODE
> and the Windows API defines 2 flavors of functions, for
> example: MessageBoxA, and MessageBoxW. The A version
> accepts 8 bit ASCII strings, and the W version takes Wide
> char unicode characters. When UNICODE is defined by
> preprocessor or in code, normal function calls default to
> the W version.

> So I thought that by removing the "/D UNICODE" definitions
> the system would default to ASCII. But when I go to build
> my app, the linker complains about unresolved symbols,
> specifically function names with the letter A at the end,
> for example: MessageBoxA(), unresolved external symbol.

> So are the PocketPC libs unicode only or is there a way to
> use ACSII?



Sat, 05 Jun 2004 01:34:12 GMT  
 Error disabling UNICODE

Quote:
>So are the PocketPC libs unicode only

Yep. It's specified in the docs.

T


Quote:
> I'm developing a PocketPC app targeting WinCE 3.0
> I have a text file with comma seperated strings which I
> want to load and parse out the strings using strtok(). It
> works fine, but then I go to add the strings into a List
> Box control, and it the text comes out as squares. I
> narrowed the problem down to the fact that the system is
> expecting a wide char (unicode) string passed to it, and
> I'm using ASCII 8 bit chars. Upon looking in the project
> settings in the preprocessor area, I found "/D UNICODE"
> and "/D _UNICODE". Obviously this means it's using UNICODE
> and the Windows API defines 2 flavors of functions, for
> example: MessageBoxA, and MessageBoxW. The A version
> accepts 8 bit ASCII strings, and the W version takes Wide
> char unicode characters. When UNICODE is defined by
> preprocessor or in code, normal function calls default to
> the W version.

> So I thought that by removing the "/D UNICODE" definitions
> the system would default to ASCII. But when I go to build
> my app, the linker complains about unresolved symbols,
> specifically function names with the letter A at the end,
> for example: MessageBoxA(), unresolved external symbol.

> So are the PocketPC libs unicode only or is there a way to
> use ACSII?



Sat, 05 Jun 2004 03:19:08 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Is there a switch to disable UNICODE in VC7.0

2. Error Using Unicode ATL Control (developed on Winnt m/c) on a Win 95 m/c

3. Link Error in Unicode Release MinSize, Regsvr32 failed on NT

4. Win32 Unicode Release Minsize build errors

5. MFC Errors in dbcore.cpp regarding UNICODE

6. Unicode compile errors

7. Unicode related error?

8. Unicode Console App - Linking Errors

9. MFC Errors in dbcore.cpp regarding UNICODE

10. Linker error on UNICODE definition

11. Holding Messages Error - Unicode

12. Error in STDIO.H compiling MFC UNICODE!?

 

 
Powered by phpBB® Forum Software