[audacity4blind] Re: Nyquist Unicode support (was: Audacity Plugins)

  • From: Steve the Fiddle <stevethefiddle@xxxxxxxxx>
  • To: audacity4blind@xxxxxxxxxxxxx
  • Date: Mon, 2 Feb 2015 22:31:34 +0000

Hi Robert,

I'm finding it difficult to understand what you are getting at, or how it
would work in practice - mostly because I don't use Windows and the problem
does not exist on Linux.

Audacity 2.1 is due out in a few weeks, so it's too late to submit changes
now. After Audacity 2.1 has been released, why don't you submit a patch to
the developer's mailing list. I know that Leland is intending to do some
more work on Nyquist after the 2.1 release so you could bring it to his
attention (also, he works on Windows, Mac and Linux). It would certainly be
a very good thing if this issue could finally be resolved.

Steve



On 2 February 2015 at 21:32, Robert Hänggi <aarjay.robert@xxxxxxxxx> wrote:

> 2015-02-02 9:03 GMT+01:00, Steve the Fiddle <stevethefiddle@xxxxxxxxx>:
> > Apparently this is a long standing issue on Windows.
> > 4 years ago Edgar Franke wrote on Bugzilla:
> >
> >> It's Windows itself that causes the problems. Different Windows versions
> > use
> >> different encoding tables. So it's not even for sure that a program
> > compiled
> >> on Win7 will display correct Unicode on older Windows versions. Windows
> > is
> >> _not_ backwards-compatible to itself.
> >> But UTF-8 has very good chances to become the future Unicode standard.
> > Most
> >> Unices, Linux, Mac OS X and the most recent Windows versions already
> > support
> >> UTF-8, so it's probably only a question of time until these problems
> >> disappear.
> >
> > I don't use Windows, so I have no idea if Microsoft have finally sorted
> > this out for Windows 8.x or not, but I don't see that we can do much
> about
> > it until they do.
> >
> >
> > Steve
> >
>
> I see a lot one can do.
> There's for one Nyquist.cpp that should treat the string conversion
> according to the underlying OS.
>
> There's in particular this function:
>
> wxString EffectNyquist::NyquistToWxString(const char *nyqString)
> {
>     wxString str(nyqString, wxConvUTF8);
>     if (nyqString != NULL && nyqString[0] && str.IsEmpty()) {
>         // invalid UTF-8 string, convert as Latin-1
>         str = _("[Warning: Nyquist returned invalid UTF-8 string,
> converted here as Latin-1]");
>         str += LAT1CTOWX(nyqString);
>     }
>     return str;
> }
>
> I would firstly comment out the warning.
> - It has no line break
> - It's not a proper exception handling for the debug output alone (it
> appears in the standard output as well)
> - It lacks a line break at the end.
>
> I've demonstrated that one string can be converted to latin-1 within
> the XLisp code itself.
>
> The function could be integrated into system.lsp and be called if
> necessary (for full-qualified file names, that is).
> There are plenty of standard environment variables that can determine
> if this is the case.
>
> It is also possible to integrate an additional Nyquist function that
> deals with file-paths/names
> WXString provides the right conversions for this.
>
>
> How does Linux react to e.g.
>
> (princ "H\366rb\374cher")
> Is it able to print "Hörbücher"?
>
> Robert
>
> The audacity4blind web site is at
> //www.freelists.org/webpage/audacity4blind
>
> Subscribe and unsubscribe information, message archives,
> Audacity keyboard commands, and more...
>
> To unsubscribe from audacity4blind, send an email to
> audacity4blind-request@xxxxxxxxxxxxx
> with subject line
> unsubscribe
>
>

Other related posts: