Letters with an accent

forum.sourcecode (2000-2005) & forum.td.sourcecode (2005-2010)

Letters with an accent

Post by Merlin » 22 Jan 2008, 17:33

 Posted by:  Merlin 


I have a problem writing the letter "é" ("e" with an accent/stress) into a
text file.
In Centura the letter is displayed correctly, but when I take a look into
the file I have created, I get the following output:


Any ideas of how to store the "é"?

If SalFilePutStr ( "Liberté" )

Jeff Luther
Site Admin
Site Admin
United States of America
Posts: 2370
Joined: 04 Mar 2017, 18:34
Location: Palm Springs, California

Re: Letters with an accent

Post by Jeff Luther » 22 Jan 2008, 17:53

 Posted by:  Jeff Luther 

The old Centura did not support Unicode, Merlin, so the function
SalFilePutStr() does not either (and thus cannot write any -- what I
would call -- the 'extended' ASCII set of chars, like your "e").

I am assuming that the stored file, when read back into CTD *does*
display the "e" with accent aigu in the field or TW column, right? So
all you want is for the file to contain that "é" (or other multi-byte

There was some msg. traffic here on the NG last year about this issue
which included a posting of an APL to convert a normal/ANSI string -->
Unicode. I've zipped a couple msgs. and the APL together for you, FYI.
That should get you started.

The 'secret' to he conversion is the Win API KERNEL32 function
WideCharToMultiByte(), called in the class
clsUnicodeFile.__WideToString() function. Take a look at that.

Best Regards,
Jeff @ PC Design
info. & samples: www.JeffLuther.net/unify/

You do not have the required permissions to view the files attached to this post.


Re: Letters with an accent

Post by Merlin » 22 Jan 2008, 18:10

 Posted by:  Merlin 

Many thanks for your informative response!
I haven´t tested yet to read back the "e" into a CTD application (because
the file I create is an XML file that I like to import into Microsoft CRM),
so I don´t know whether it is displayed with an accent in this case.

I will take a closer look at the APL tomorrow.

Many thanks again,

Return to “td.sourcecode”

Who is online

Users browsing this forum: [Ccbot] and 0 guests