Mail Archives: geda-user/2014/01/22/12:45:19
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: | <CAOxVtST0iYht7aJHAh+sF4HnFSgYFk6nZwWO=0tOhh5+FZ9XYw@mail.gmail.com>
|
References: | <CAG4ve9K=uYwmRn6npM=jq-AGpZ1najFFyz19m0VdNsgnx4oQ0w AT mail DOT gmail DOT com>
|
| <CAOxVtST0iYht7aJHAh+sF4HnFSgYFk6nZwWO=0tOhh5+FZ9XYw AT mail DOT gmail DOT com>
|
Date: | Wed, 22 Jan 2014 21:44:52 +0400
|
Message-ID: | <CAG4ve9JGK5mMGAhLu65kSmEAC1b-P1XMCJBL1tayqF6VdY_oQw@mail.gmail.com>
|
Subject: | Re: [geda-user] gnetlist localization patch
|
From: | =?KOI8-R?B?4czFy9PFyiDowdLYy8/X08vJyg==?= <svetonomer AT gmail DOT com>
|
To: | geda-user AT delorie DOT com
|
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
|
--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 <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> 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 <locale.h>
>
> 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
<div dir=3D"ltr"><div><div><div><div><div>Have you russian components or sy=
mbol?<br></div>I nave some components with Ru.utf8 filenames in componts pa=
th.<br></div>Example:<br>=EB293=EB=F011-1.sym <br></div>gnetlist terminated=
with errors.<br>
</div>gschem NOT terminated and allowing to use this component.<br><br></di=
v><div>In gschem.c in main() I see :<br>setlocale(LC_ALL, "")<br>=
</div><div><div>setlocale(LC_NUMERIC, "C"));<div>and it works.<br=
>
<br></div><div>Therefore I wrote this in gnetlist and it works too.<br><div=
id=3D"gt-src-c" class=3D""><div id=3D"gt-src-p"> </div> </div> <div id=3D"=
gt-res-c" class=3D""><div id=3D"gt-res-p"><div id=3D"gt-res-data"><div id=
=3D"gt-res-wrap">
<div id=3D"gt-res-content" class=3D""><div dir=3D"ltr" style=3D"zoom:1"><sp=
an id=3D"result_box" class=3D"" lang=3D"en"><span class=3D"">Therefore</spa=
n> this is <span class=3D"">really needed.</span></span></div></div></div><=
/div></div></div>
<br><br></div><div><div class=3D"gmail_extra"><br><br><div class=3D"gmail_q=
uote">2014/1/22 Sergey Alyoshin <span dir=3D"ltr"><<a href=3D"mailto:aly=
oshin DOT s AT gmail DOT com" target=3D"_blank">alyoshin DOT s AT gmail DOT com</a>></span><br=
><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border=
-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class=3D""><div class=3D"h5">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<br>
<<a href=3D"mailto:svetonomer AT gmail DOT com">svetonomer AT gmail DOT com</a>> wr=
ote:<br>
> Hello all.<br>
> At present, if in "component-library-search" path (declared =
in gafrc) exists<br>
> files with NON ascii filenames (locale of filenames non en_US), the gn=
etlist<br>
> program terminated with error:<br>
><br>
> =9Aleha AT work ~/local_repo/geda-gaf-git $ gnetlist<br>
> ERROR: Failed to load RC file [/home/leha/.gEDA/gafrc]: ERROR: Invalid=
path<br>
> ~S. "/home/leha/.gEDA/symbols/egor/sym/??293????1-1.sym"<br>
><br>
> The attached simplest patch resolve this problem and makes possible us=
ing<br>
> locale environment.<br>
<br>
</div></div>Is<br>
+ =9Asetlocale(LC_ALL, "");<br>
really necessary? It set default locale, which already should be<br>
locale environment.<br>
<br>
The following code output is<br>
<br>
ru_RU.UTF-8 /* current */<br>
ru_RU.UTF-8 /* default */<br>
C<br>
<br>
#include <locale.h><br>
<br>
int main(void)<br>
{<br>
=9A =9A printf("%s\n%s\n%s\n",<br>
=9A =9A =9A =9A setlocale(LC_ALL, NULL), =9A =9A/* current */<br>
=9A =9A =9A =9A setlocale(LC_ALL, ""), =9A =9A =9A =9A/* default =
*/<br>
=9A =9A =9A =9A setlocale(LC_NUMERIC, "C"));<br>
}<br>
<br>
</blockquote></div><br></div></div></div></div></div>
--047d7b3a81429ff56504f092ae99--
- Raw text -