User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 361,912 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,554 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C++ advertiser:
Views: 747 | Replies: 4
Reply
Join Date: Aug 2005
Location: Seaham, UK
Posts: 178
Reputation: bops is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 2
bops bops is offline Offline
Junior Poster

Multi-character support

  #1  
Sep 3rd, 2006
Hi, I want to create an application like character map, for only specific characters, and extra features. There is quite a large problem in doing this though. I want to have controls whos captions have these special characters. However when I am creating this using my IDE, Pasting these characters into the code just put a "?", since the edit box in the IDE does not support all of these extra characters. I cant exactly use a RTF editor since when the file is saved it saves with it all of the formatting chars etc. I need to be able to use a plain text editor that supports these characters, any ideas?
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Aug 2005
Location: near St Louis, Missouri, USA
Posts: 9,886
Reputation: Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of 
Rep Power: 32
Solved Threads: 793
Moderator
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Posting Prodigy

Re: Multi-character support

  #2  
Sep 3rd, 2006
The problem you see is due the the font the editor uses. Look around the editor's menu and see if it allows you to change the font, then find a font that supports the characters you want to use.
Reply With Quote  
Join Date: Aug 2005
Location: Seaham, UK
Posts: 178
Reputation: bops is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 2
bops bops is offline Offline
Junior Poster

Re: Multi-character support

  #3  
Sep 3rd, 2006
I have tried switching the font on notepad to Microsoft Sans Serif using the special characters. The characters where displayed correctly, but when i saved the file, it prompted me to save the file with unicode encoding to support these characters. In doing this i tried to compile the file and i recieved lots of errors like ... "C:\file.cpp:182:1: warning: null character(s) ignored"

Saving with ANSI encoding does not support these characters, and unicode generates lots of errors.
Reply With Quote  
Join Date: Aug 2005
Location: Seaham, UK
Posts: 178
Reputation: bops is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 2
bops bops is offline Offline
Junior Poster

Re: Multi-character support

  #4  
Sep 3rd, 2006
actually, there are warnings like that for every single line, but before all the warnings appear errors like this appear... "error: stray '\203' in program" etc.
Reply With Quote  
Join Date: Aug 2005
Location: near St Louis, Missouri, USA
Posts: 9,886
Reputation: Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of 
Rep Power: 32
Solved Threads: 793
Moderator
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Posting Prodigy

Re: Multi-character support

  #5  
Sep 3rd, 2006
you probably need to compile your program to support UNICODE. You can't treat a unicode-written file as if it were an ascii file becuase it is not the same file format. UNICODE characters are two or more bytes per character.so you need to use char data type with wchar_t and use unicode replacements for string handling functions. c++ std::wstring instead of std::string.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb C++ Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the C++ Forum

All times are GMT -4. The time now is 9:48 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC