X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=Eu7Tkn9zfYGAp3mpVT9Igo3WIRFNCnL6tw1XslVs/SM=; b=NbSo45nayC7q6K4Dta4HBdpOVCLoHK1HxHf3kWUL93W0kavMzjkIFzoAA5EOYSf490 2861xXxioQT/gV+cSwX4khuPKvVrL/WilyDZKRrHIxPcWn88JSE241CE0XHA+pkZINpb bphwaojas+PjgyLxRYv2aT1iPk/ThKEM1WV9T79valykxYEHvq+X7lOfzV67sdP41qc/ /xwO/3fQaK6mEt2Yt0JC84BNGiJA3ghffAij2Jkbutu5notlsNg+2YJgKB6Df7FOgO4m q/w5AKDJBgtVy5C0WY9YbMLiKiWkoH/tsCg97NA0+plfdW2tSbItvHEWjWeoTNeNs/QI KRFw== MIME-Version: 1.0 X-Received: by 10.60.125.98 with SMTP id mp2mr966177oeb.86.1390412692450; Wed, 22 Jan 2014 09:44:52 -0800 (PST) In-Reply-To: References: Date: Wed, 22 Jan 2014 21:44:52 +0400 Message-ID: Subject: Re: [geda-user] gnetlist localization patch From: =?KOI8-R?B?4czFy9PFyiDowdLYy8/X08vJyg==?= To: geda-user AT delorie DOT com Content-Type: multipart/alternative; boundary=047d7b3a81429ff56504f092ae99 Reply-To: geda-user AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: geda-user AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk --047d7b3a81429ff56504f092ae99 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable Have you russian components or symbol? I nave some components with Ru.utf8 filenames in componts path. Example: =EB293=EB=F011-1.sym gnetlist terminated with errors. gschem NOT terminated and allowing to use this component. In gschem.c in main() I see : setlocale(LC_ALL, "") setlocale(LC_NUMERIC, "C")); and it works. Therefore I wrote this in gnetlist and it works too. Therefore this is really needed. 2014/1/22 Sergey Alyoshin > On Wed, Jan 22, 2014 at 8:37 PM, =E1=CC=C5=CB=D3=C5=CA =E8=C1=D2=D8=CB=CF= =D7=D3=CB=C9=CA > wrote: > > Hello all. > > At present, if in "component-library-search" path (declared in gafrc) > exists > > files with NON ascii filenames (locale of filenames non en_US), the > gnetlist > > program terminated with error: > > > > leha AT work ~/local_repo/geda-gaf-git $ gnetlist > > ERROR: Failed to load RC file [/home/leha/.gEDA/gafrc]: ERROR: Invalid > path > > ~S. "/home/leha/.gEDA/symbols/egor/sym/??293????1-1.sym" > > > > The attached simplest patch resolve this problem and makes possible usi= ng > > locale environment. > > Is > + setlocale(LC_ALL, ""); > really necessary? It set default locale, which already should be > locale environment. > > The following code output is > > ru_RU.UTF-8 /* current */ > ru_RU.UTF-8 /* default */ > C > > #include > > int main(void) > { > printf("%s\n%s\n%s\n", > setlocale(LC_ALL, NULL), /* current */ > setlocale(LC_ALL, ""), /* default */ > setlocale(LC_NUMERIC, "C")); > } > > --047d7b3a81429ff56504f092ae99 Content-Type: text/html; charset=KOI8-R Content-Transfer-Encoding: quoted-printable
Have you russian components or sy= mbol?
I nave some components with Ru.utf8 filenames in componts pa= th.
Example:
=EB293=EB=F011-1.sym
gnetlist terminated= with errors.
gschem NOT terminated and allowing to use this component.

In gschem.c in main() I see :
setlocale(LC_ALL, "")
=
setlocale(LC_NUMERIC, "C"));
and it works.
Therefore I wrote this in gnetlist and it works too.
Therefore this is really needed.
<= /div>




2014/1/22 Sergey Alyoshin <alyoshin DOT s AT gmail DOT com>
On Wed, Jan 22, 2014 at 8:37 PM, =E1=CC= =C5=CB=D3=C5=CA =E8=C1=D2=D8=CB=CF=D7=D3=CB=C9=CA
<svetonomer AT gmail DOT com> wr= ote:
> Hello all.
> At present, if in "component-library-search" path (declared = in gafrc) exists
> files with NON ascii filenames (locale of filenames non en_US), the gn= etlist
> program terminated with error:
>
> =9Aleha AT work ~/local_repo/geda-gaf-git $ gnetlist
> ERROR: Failed to load RC file [/home/leha/.gEDA/gafrc]: ERROR: Invalid= path
> ~S. "/home/leha/.gEDA/symbols/egor/sym/??293????1-1.sym"
>
> The attached simplest patch resolve this problem and makes possible us= ing
> locale environment.

Is
+ =9Asetlocale(LC_ALL, "");
really necessary? It set default locale, which already should be
locale environment.

The following code output is

ru_RU.UTF-8 /* current */
ru_RU.UTF-8 /* default */
C

#include <locale.h>

int main(void)
{
=9A =9A printf("%s\n%s\n%s\n",
=9A =9A =9A =9A setlocale(LC_ALL, NULL), =9A =9A/* current */
=9A =9A =9A =9A setlocale(LC_ALL, ""), =9A =9A =9A =9A/* default = */
=9A =9A =9A =9A setlocale(LC_NUMERIC, "C"));
}


--047d7b3a81429ff56504f092ae99--