Subj : Re: WX
To   : Digital Man
From : Deuce
Date : Wed Apr 13 2016 01:32 am

 Re: Re: WX
 By: Digital Man to KenDB3 on Tue Mar 29 2016 05:37 pm

>  > I think my problem is that data is coming back from Weather Underground
>  > in UTF-8, which is not a problem when it is in (US) English, but starts
>  > to present a problem with the couple of Latin based languages I tried to
>  > implement. Is there any way to clean/convert the text before displaying
>  > it?
>
> Yes, UTF-8 could be translated, but the results may not be very good/useful,
> depending on stuff (e.g. the source and target locale).
>
>  > Someone asked for this feature, and I thought it would be an easier ask
>  > than some of the other requests I got, but it proved more challenging
>  > thanks to the UTF-8 characters.
>
>  > Any advice is welcome :-)
>
> Stick to US-English? :-) Seriously though, I don't really have any advice on
> this topic as I haven't been big on translating software to other locales or
> worrying about non-CP437-capable terminals. Maybe Deuce has some advice.

In the latest CVS, there's a utf8_cp437.js file you can load()... after you do,
you can call utf8_cp437(utf8_string) and it returns a cp437 version of the same
string.  It handles most common codepoints, but unknown ones are replaced with
a question mark.  If you find ones that need to be added, please let us know.

---
� Synchronet � The future of BBSing