Where have all the umlauts gone?

M

Moritz Beller

Hello!

Given an array of chars such as
char array[] = "Umlauts öäü"
(that is definitely able to handle those special characters) a
conversion to string returns in getting ripped of the special characters
öäü. Obviously, this is something I don't wanna see happen, but
otherwise, I don't even have a clue on how to avoid it.

Any help urgently required ;-)

best regards / Gruß
Moritz Beller
 
V

Victor Bazarov

Moritz Beller said:
Given an array of chars such as
char array[] = "Umlauts öäü"
(that is definitely able to handle those special characters) a
conversion to string returns in getting ripped of the special characters
oau. Obviously, this is something I don't wanna see happen, but
otherwise, I don't even have a clue on how to avoid it.

Any help urgently required ;-)

String literals cannot contain "extended" characters directly. You
need to put them there in the form of the universal-character-name
or an escape sequence. For example, the u-umlaut has Unicode code
00FC, so you'd probably put it there using \u00fc. Your literal
should become

"Umlauts \u00f6\u00e4\u00fc"

(I couldn't test this on my system, though). I bet those things are
platform-specific.

V
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,053
Latest member
BrodieSola

Latest Threads

Top