Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Print French characters in Pro*C

User574525-OCOct 10 2017 — edited Feb 17 2018

Hi Sergiusz,

I went through one of your post in this forum regarding the reading and printing of unicode characters in Pro *C. Hence I am posting this discussion directly to you.

I have a UI where user will input the description to be either in English or in French. DB table stores the French values properly. In Pro *C program I need to read this French description and print it in a file.

The French description what I see in DB is not same as what is getting printed. I followed one of your post and tried to do is, But still I don't get the expected output. Could you please suggest?

char character set is nchar_cs my_utf8_str[120] ;

EXEC SQL DECLARE c_get_desc CURSOR FOR

SELECT nvl(tl\_shadow.translated\_value,' ') 

  FROM tl\_shadow

 WHERE tl\_shadow.key= UPPER(:ip\_desc)

   AND tl\_shadow.lang=3;

EXEC SQL OPEN c_get_desc;

EXEC SQL FETCH c_get_desc INTO my_utf8_str;

EXEC SQL CLOSE c_get_desc;

printf("Desc is %s\n",my_utf8_str);

Output:

pastedImage_0.png

Expected Output:

pastedImage_1.pngIt is actually a one line output. My screen shot shows it in 2 lines. The word is Mobility and actual French translation is Mobilite with accent for e. But I see it as Ajunk.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 17 2018
Added on Oct 10 2017
15 comments
2,162 views