Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

non-unicode to unicode

Status
Not open for further replies.

ilkertanli

Programmer
Jun 9, 2004
21
US
i am having issues while writing a file renamer program using borland c++. The problem is I can not replace non-unicode char to the unicode ones, for example i (not i) borland doesnt even let me to declare non-unicode chars.

If somebody has a clue or exprienced this before, please let me know.

Thnx...

Ilker TANLI
 
hmm...
I suppose, your situation is a bit viceevrsa. Could you please tell how do you declare your chars?

Ion Filipski
1c.bmp
 
I tried to declare non-unicode characters as a type of char for ex: char ch = 'i'; (by the vay i does not have dot on top, i can not type it here), and borland c++ doesnt let me to declare it. Everytime I hit i (without dot on top) it types i (with dot on top). There should be a way to rename files which includes i(without dot on top).

Here is part of my program:

Code:
for(int i = 0; i<=strlen(newfilename); i++)
         {
         	char ch;
            ch = newfilename[i];
            if(ch == 'ü')
            	newfilename[i] = 'u';
				else if(ch == 'Ü')
            	newfilename[i] = 'U';
            else if(ch == '')
            	newfilename[i] = 'i';
          }

rename(oldfilename, newfilename);

Ilker TANLI
 
maybe your 'i' is from an other charset. See in hexedit if value of your 'i'is greater that 0x80 or lower. If is greater, it means there is a non ASCII 'i'.

Ion Filipski
1c.bmp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top