Hello,
I have data written on DOS on my specific codepage (852).
If I want to read this data in windows I must recode strings to replace non english characters and I do this successfully with VB program.
Now I want to replace those characters, readed from file, with C and I can't do this with following code.
Probably because I am total C newbie.
I get error: case label value exceeds maximum value for typeCode:int i; char* ps = mystring; for (i = 0; i <= sizeof(mystring); i++) { switch(*ps){ case 230: *ps=208; break; case 209: *ps=230; break; . . . } }
After some digging I found that char values can be to 127 what causes those error.
Shown part of program change characters well when they are under ASCII 127.
What should I do to be able to change ASCII characters in range 0-255?
Of course, I would like to recode again before writing data back to disk so my DOS program would be able to read it. But this is the same problem as described above.
For more information here is my "lookup" table in form:
char_from, char_to, ASCII_from, ASCII_to
ć Đ 230 208
Ń ć 209 230
Đ Ć 208 198
† Ž 134 142
¬ č 172 232
Ź ž 143 158
¦ š 166 154
ź Š 159 138
§ Č 167 200
ç đ 231 240
Thanks in advance, nime.