Text with accented characters

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Text with accented characters

Tore Nilsen via use-livecode
I am importing some text where certain characters do not look right.  When I test their charToNum values I get, for example, 226 and 232.  226 is shown as a comma, but should be a lower case a with a circumflex, and 232 is shown as an upper case e with an umlaut but should be a lower case e with accent grave.  Is there some font I can choose, or some other action I should take, to get these (and others) to display properly?
David Epstein
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Text with accented characters

Tore Nilsen via use-livecode
Hi David,

From the LC dictionary:

Important: As of version 7.0 the numToChar and charToNum functions have been deprecated. They will continue to work as in previous versions but should not be used with Unicode text as unexpected results may occur. If working with Unicode text use the numToCodepoint and codepointToNum functions, for native text use numToNativeChar and nativeCharToNum functions. If working with binary data use the numToByte and byteToNum functions.

Try these other functions first…

Peter Bogdanoff


> On Jun 3, 2018, at 4:31 PM, David Epstein via use-livecode <[hidden email]> wrote:
>
> I am importing some text where certain characters do not look right.  When I test their charToNum values I get, for example, 226 and 232.  226 is shown as a comma, but should be a lower case a with a circumflex, and 232 is shown as an upper case e with an umlaut but should be a lower case e with accent grave.  Is there some font I can choose, or some other action I should take, to get these (and others) to display properly?
> David Epstein
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Text with accented characters

Tore Nilsen via use-livecode
In reply to this post by Tore Nilsen via use-livecode
This would be typical  of importing Mac/Win Type 1 fonts or ANSI only True Type. The range ANSI characters (128-255) varies depending on the platform which it was input from; add to the caveat introduce by the "native" program (Quark, InDesign, Pages, MSWord, Outlook, PDF). In theory Livecode handles it correctly, but many cases not...(through no fault of its own). I spent year(s) in that world.  

The only answer: Unicode. Are you sure the text is Unicode?

Brahmanathaswami
 

On 6/3/18, 1:32 PM, "use-livecode on behalf of David Epstein via use-livecode" <[hidden email] on behalf of [hidden email]> wrote:

    I am importing some text where certain characters do not look right.  When I test their charToNum values I get, for example, 226 and 232.  226 is shown as a comma, but should be a lower case a with a circumflex, and 232 is shown as an upper case e with an umlaut but should be a lower case e with accent grave.  Is there some font I can choose, or some other action I should take, to get these (and others) to display properly?
    David Epstein

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Text with accented characters

Tore Nilsen via use-livecode
In reply to this post by Tore Nilsen via use-livecode
For what it's worth glyph 226 (Hex E2) in Unicode has a â (a
circumflex), and glyph 232 (Hex E8)

has a è ( e grave): so your initial font seems Unicode compliant


Here's a good place to check this sort of thing:

https://www.unicode.org/charts/

(this is, in some respects, my spiritual home on the internet).


Now: knowing that that font is Unicode compliant you should be able to
transform things

back and forth between characters and numbers using numToCodePoint and
codePointToNum.


I'm not sure why you are having trouble importing these characters.

A 'trick'  is to do something like this:

set the unicodeText of field "fiddlyDo" to the unicodeText of WHATHAVEYER.


Richmond.


On 4.06.2018 02:31, David Epstein via use-livecode wrote:
> I am importing some text where certain characters do not look right.  When I test their charToNum values I get, for example, 226 and 232.  226 is shown as a comma, but should be a lower case a with a circumflex, and 232 is shown as an upper case e with an umlaut but should be a lower case e with accent grave.  Is there some font I can choose, or some other action I should take, to get these (and others) to display properly?
> David Epstein
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode