Reading Dos text (Cp850, Cp437, Cp1252)

Mark Smith mark at maseurope.net
Fri Aug 3 03:51:33 EDT 2007


One way would be to simply (and rather painstakingly!) build arrays  
(storable as customPropertySets) as look-ups for each code page, such  
that you could then do:

repeat for each char c in someText
   put codePage850[charToNum(c)] after someTranslatedText
end repeat

This might make for a useful library - the code page points are on  
Wikipedia:
http://en.wikipedia.org/wiki/Code_page_850

Having said that, according to the docs (for numTChar())," On Mac OS  
systems this is normally the Macintosh character set; on Unix  
systems, this is normally ISO 8859; on Windows systems, this is  
usually Code Page 1252, a variant of ISO 8859."

So on Windows, you may not need to translate cp1252, and on Mac the  
macToIso() function may do the job.

Best,

Mark

On 3 Aug 2007, at 08:19, Malte Brill wrote:

> Hi all,
>
> anyone got a pointer how to read text in those formats and get it  
> to display correctly? (including umlauts and stuff.)
>
> Cp850, Cp437, Cp1252
>
> All the best,
>
> Malte
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list