<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-1827</id>
	<title>Nabble - Gnu - Utils</title>
	<updated>2009-11-28T20:44:07Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/Gnu---Utils-f1827.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Gnu---Utils-f1827.html" />
	<subtitle type="html">Gnu - Utils home is &lt;a href=&quot;http://www.gnu.org/software/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.</subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-26559340</id>
	<title>Re: German uppercasing rules (was: supporting obscure languages)</title>
	<published>2009-11-28T20:44:07Z</published>
	<updated>2009-11-28T20:44:07Z</updated>
	<author>
		<name>John Cowan</name>
	</author>
	<content type="html">Albert Cahalan scripsit:
&lt;br&gt;&lt;br&gt;&amp;gt; &amp;gt; Unicode 5.0 has introduced the character U+1E9E &amp;quot;LATIN CAPITAL LETTER SHARP S&amp;quot;,
&lt;br&gt;&amp;gt; &amp;gt; but the habits in Germany have not changed. The upper-case variant of &amp;quot;Ruß&amp;quot;
&lt;br&gt;&amp;gt; &amp;gt; is still &amp;quot;RUSS&amp;quot;. German people don't care about whether this round-trips
&lt;br&gt;&amp;gt; &amp;gt; or not. &amp;quot;ß&amp;quot; uppercases to &amp;quot;SS&amp;quot;. It has been like this for centuries.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Germans with &amp;quot;ß&amp;quot; in their last name are people too, and they care.
&lt;br&gt;&lt;br&gt;I don't see why those people would expect to see their names in upper case.
&lt;br&gt;&lt;br&gt;&amp;gt; U+1E9E exists solely because there is real evidence that people care.
&lt;br&gt;&lt;br&gt;True, but the people in question are mostly the designers of
&lt;br&gt;advertisements who want to put headlines in all caps.
&lt;br&gt;&lt;br&gt;As a certified alter kocker, I personally think that German looks horrible
&lt;br&gt;in all caps, but that battle was lost a generation ago.
&lt;br&gt;&lt;br&gt;&amp;gt; It is pretty common to uppercase &amp;quot;ß&amp;quot; as itself; clearly people care.
&lt;br&gt;&lt;br&gt;Especially if they have blindly applied simple Unicode uppercasing rather
&lt;br&gt;than proper German uppercasing.
&lt;br&gt;&lt;br&gt;Turkic, though, is a more complex problem. &amp;nbsp;Knowing how to properly recase
&lt;br&gt;German or Greek just requires applying the algorithm: you don't have to
&lt;br&gt;know that the text actually is German or Greek. &amp;nbsp;To correctly change the
&lt;br&gt;case of a Turkic language, you have to know for sure that you are dealing
&lt;br&gt;with Turkic text. &amp;nbsp;I can well understand if people fail to get that right,
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;John Cowan &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26559340&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cowan@...&lt;/a&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://www.ccil.org/~cowan&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.ccil.org/~cowan&lt;/a&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Is it not written, &amp;quot;That which is written, is written&amp;quot;?
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---Utils---Bugs-f1828.html&quot; embed=&quot;fixTarget[1828]&quot; target=&quot;_top&quot; &gt;Gnu - Utils - Bugs&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/supporting-obscure-languages-tp26538776p26559340.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26557718</id>
	<title>Re: German uppercasing rules (was: supporting obscure languages)</title>
	<published>2009-11-28T14:51:18Z</published>
	<updated>2009-11-28T14:51:18Z</updated>
	<author>
		<name>Bruno Haible</name>
	</author>
	<content type="html">Albert Cahalan wrote:
&lt;br&gt;&amp;gt; Sooner or later, a &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26557718&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;de_DE@...&lt;/a&gt; locale will be demanded.
&lt;br&gt;&lt;br&gt;Yes, certainly. Maybe in 5 years, or 10 years, or in 20 years. But currently,
&lt;br&gt;hardly any font contains the U+1E9E &amp;quot;LATIN CAPITAL LETTER SHARP S&amp;quot; character.
&lt;br&gt;Therefore currently, we should stay with the traditional rule of &amp;quot;ß&amp;quot; -&amp;gt; &amp;quot;SS&amp;quot;.
&lt;br&gt;&lt;br&gt;&amp;gt; In any case, you won't be getting &amp;quot;SS&amp;quot; out of towupper.
&lt;br&gt;&lt;br&gt;Yes. It is for this reason that
&lt;br&gt;&amp;nbsp; 1. towupper('ß') == 'ß',
&lt;br&gt;&amp;nbsp; 2. a simple loop that calls towupper is *not* the right way to uppercase an
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;arbitrary string.
&lt;br&gt;&lt;br&gt;And lowercasing does not work with a simple loop over towlower either, because
&lt;br&gt;of GREEK CAPITAL LETTER SIGMA that needs special treatment.
&lt;br&gt;&lt;br&gt;&amp;gt; I hope libunistring doesn't impede the evolution of languages.
&lt;br&gt;&lt;br&gt;libunistring is free software: it can be changed to fit particular needs.
&lt;br&gt;&lt;br&gt;Bruno
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---Utils---Bugs-f1828.html&quot; embed=&quot;fixTarget[1828]&quot; target=&quot;_top&quot; &gt;Gnu - Utils - Bugs&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/supporting-obscure-languages-tp26538776p26557718.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26558653</id>
	<title>Re: German uppercasing rules (was: supporting obscure languages)</title>
	<published>2009-11-28T13:36:39Z</published>
	<updated>2009-11-28T13:36:39Z</updated>
	<author>
		<name>Albert Cahalan</name>
	</author>
	<content type="html">On Sat, Nov 28, 2009 at 3:11 PM, Bruno Haible &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26558653&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;bruno@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; Albert Cahalan wrote:
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; Maybe round-trip the case for U+1E9E, avoiding expansion troubles.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Unicode 5.0 has introduced the character U+1E9E &amp;quot;LATIN CAPITAL LETTER SHARP S&amp;quot;,
&lt;br&gt;&amp;gt; but the habits in Germany have not changed. The upper-case variant of &amp;quot;Ruß&amp;quot;
&lt;br&gt;&amp;gt; is still &amp;quot;RUSS&amp;quot;. German people don't care about whether this round-trips
&lt;br&gt;&amp;gt; or not. &amp;quot;ß&amp;quot; uppercases to &amp;quot;SS&amp;quot;. It has been like this for centuries.
&lt;br&gt;&lt;br&gt;Germans with &amp;quot;ß&amp;quot; in their last name are people too, and they care.
&lt;br&gt;U+1E9E exists solely because there is real evidence that people care.
&lt;br&gt;It is pretty common to uppercase &amp;quot;ß&amp;quot; as itself; clearly people care.
&lt;br&gt;&lt;br&gt;Sooner or later, a &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26558653&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;de_DE@...&lt;/a&gt; locale will be demanded.
&lt;br&gt;German rules have changed a number of times in the 1900s, and
&lt;br&gt;they certainly can change again.
&lt;br&gt;&lt;br&gt;In any case, you won't be getting &amp;quot;SS&amp;quot; out of towupper.
&lt;br&gt;&lt;br&gt;&amp;gt; Therefore if you want your program to do case conversions right for German
&lt;br&gt;&amp;gt; (and Turkish, Greek, Lithuanian etc.), you need to perform case conversions
&lt;br&gt;&amp;gt; on entire strings, not merely on characters one by one. In C programs,
&lt;br&gt;&amp;gt; you can use GNU libunistring [1] for this purpose. It has all the special cases
&lt;br&gt;&amp;gt; built-in.
&lt;br&gt;&lt;br&gt;Yes, of course, but that doesn't work for towupper.
&lt;br&gt;&lt;br&gt;I hope libunistring doesn't impede the evolution of languages.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---Utils---Bugs-f1828.html&quot; embed=&quot;fixTarget[1828]&quot; target=&quot;_top&quot; &gt;Gnu - Utils - Bugs&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/supporting-obscure-languages-tp26538776p26558653.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26556553</id>
	<title>Re: German uppercasing rules (was: supporting obscure languages)</title>
	<published>2009-11-28T12:11:25Z</published>
	<updated>2009-11-28T12:11:25Z</updated>
	<author>
		<name>Bruno Haible</name>
	</author>
	<content type="html">Albert Cahalan wrote:
&lt;br&gt;&amp;gt; Maybe round-trip the case for U+1E9E, avoiding expansion troubles.
&lt;br&gt;&lt;br&gt;Unicode 5.0 has introduced the character U+1E9E &amp;quot;LATIN CAPITAL LETTER SHARP S&amp;quot;,
&lt;br&gt;but the habits in Germany have not changed. The upper-case variant of &amp;quot;Ruß&amp;quot;
&lt;br&gt;is still &amp;quot;RUSS&amp;quot;. German people don't care about whether this round-trips
&lt;br&gt;or not. &amp;quot;ß&amp;quot; uppercases to &amp;quot;SS&amp;quot;. It has been like this for centuries.
&lt;br&gt;&lt;br&gt;Therefore if you want your program to do case conversions right for German
&lt;br&gt;(and Turkish, Greek, Lithuanian etc.), you need to perform case conversions
&lt;br&gt;on entire strings, not merely on characters one by one. In C programs,
&lt;br&gt;you can use GNU libunistring [1] for this purpose. It has all the special cases
&lt;br&gt;built-in.
&lt;br&gt;&lt;br&gt;Bruno
&lt;br&gt;&lt;br&gt;[1] &lt;a href=&quot;http://www.gnu.org/software/libunistring/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.gnu.org/software/libunistring/&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---Utils---Bugs-f1828.html&quot; embed=&quot;fixTarget[1828]&quot; target=&quot;_top&quot; &gt;Gnu - Utils - Bugs&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/supporting-obscure-languages-tp26538776p26556553.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26556773</id>
	<title>Re: supporting obscure languages</title>
	<published>2009-11-28T11:53:26Z</published>
	<updated>2009-11-28T11:53:26Z</updated>
	<author>
		<name>Albert Cahalan</name>
	</author>
	<content type="html">On Sat, Nov 28, 2009 at 10:49 AM, Bruno Haible &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26556773&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;bruno@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; It is similar to LC_MESSAGES=zam_MX.UTF-8 LANG=fr_FR.UTF-8, which would
&lt;br&gt;&amp;gt; be a perfectly reasonable choice for a user with French preferences but
&lt;br&gt;&amp;gt; Zapotec language. POSIX allows users to combines different aspects of
&lt;br&gt;&amp;gt; locales in this way.
&lt;br&gt;&lt;br&gt;POSIX does, but the library does not. If the library followed POSIX
&lt;br&gt;then I could combine LC_MESSAGES=zam with LANG=C.
&lt;br&gt;&lt;br&gt;In other words, this looks like a POSIX violation to me.
&lt;br&gt;&lt;br&gt;&amp;gt; It is gross, but it is consequence of your desire to use a language
&lt;br&gt;&amp;gt; for which the locale is not existent or not installed, and therefore
&lt;br&gt;&amp;gt; to do in your program what normally the users do in their system. This is
&lt;br&gt;&amp;gt; not typical. The normal case is that users set their preferences in a
&lt;br&gt;&amp;gt; central location and these preferences get transmitted to the programs via
&lt;br&gt;&amp;gt; environment variables.
&lt;br&gt;&lt;br&gt;The only part I need is installed: zam.mo
&lt;br&gt;&lt;br&gt;Since I never try to format time, the library shouldn't even try
&lt;br&gt;to load the data for that. The missing stuff shouldn't affect
&lt;br&gt;anything since I'm not attempting to use it. Supposing I did
&lt;br&gt;try to format time though, that could do some typical thing.
&lt;br&gt;&lt;br&gt;Basically this isn't fail-safe. Some chunk of locale data goes
&lt;br&gt;missing, and suddenly the whole thing dies.
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; I'm depending on some random unrelated locale
&lt;br&gt;&amp;gt;&amp;gt; just to get normal UTF-8 behavior.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Yes, this is worrying. But nowadays, on most desktop systems, at least
&lt;br&gt;&amp;gt; one user locale is installed, it uses UTF-8 encoding, and you can
&lt;br&gt;&amp;gt; enquire it through &amp;nbsp; setlocale(LC_ALL,&amp;quot;&amp;quot;).
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The systems with only the &amp;quot;C&amp;quot; locale are small-memory devices like
&lt;br&gt;&amp;gt; routers.
&lt;br&gt;&lt;br&gt;That was my system until I started debugging this problem,
&lt;br&gt;and in fact an apt-get hook wipes out locales every time I
&lt;br&gt;install packages.
&lt;br&gt;&lt;br&gt;This is because en_US.UTF-8 has defective collation order,
&lt;br&gt;and because I don't normally need translations. If I were to
&lt;br&gt;set either LANGUAGE or LC_MESSAGES alone though,
&lt;br&gt;that ought to get me translations despite anything else.
&lt;br&gt;&lt;br&gt;&amp;gt; Internationalization of a program consists of three parts:
&lt;br&gt;&amp;gt; &amp;nbsp;1) Make use of the Unicode character set.
&lt;br&gt;&amp;gt; &amp;nbsp;2) Provide translations for messages.
&lt;br&gt;&amp;gt; &amp;nbsp;3) Do the following in a locale dependent way: display of time,
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; display of currency, computations with calendar, display of
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; Hanzi ideographs (Chinese vs. Japanese - same Unicode code
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; point, different glyphs), form for entering a postal address,
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; arrangement of GUI components (right-to-left), etc.
&lt;br&gt;&lt;br&gt;Well no, not unless the program needs it. OTOH, Tux Paint
&lt;br&gt;localizes things you don't even handle: audio clips, fonts,
&lt;br&gt;font size, font vertical position, and right-to-left text rendering.
&lt;br&gt;&lt;br&gt;In any case, part of a locale is better than none. Right now
&lt;br&gt;you're essentially saying that incomplete localization isn't
&lt;br&gt;allowed; it's all or nothing.
&lt;br&gt;&lt;br&gt;&amp;gt; With a &amp;quot;C&amp;quot; locale in UTF-8 encoding, you would get part 1). You would
&lt;br&gt;&amp;gt; not get part 2), because gettext() must not use the translation message
&lt;br&gt;&amp;gt; catalogs in the &amp;quot;C&amp;quot; locale. You would also not get part 3), because
&lt;br&gt;&amp;gt; strftime etc. also must not use localized values in the &amp;quot;C&amp;quot; locale.
&lt;br&gt;&amp;gt; That's because in POSIX, the &amp;quot;C&amp;quot; locale is the locale to be set when you
&lt;br&gt;&amp;gt; want to know ahead of time the output format of &amp;quot;ls&amp;quot;, &amp;quot;df&amp;quot;, &amp;quot;date&amp;quot; etc.
&lt;br&gt;&lt;br&gt;Ah, but I asked for a different locale.
&lt;br&gt;&lt;br&gt;LANGUAGE: not set to &amp;quot;C&amp;quot;
&lt;br&gt;LC_ALL: not set to &amp;quot;C&amp;quot;
&lt;br&gt;LC_MESSAGES: not set to &amp;quot;C&amp;quot;
&lt;br&gt;LANG: not set to &amp;quot;C&amp;quot;
&lt;br&gt;setlocale's 2nd parameter: not set to &amp;quot;C&amp;quot;
&lt;br&gt;&lt;br&gt;That right there means I didn't want the &amp;quot;C&amp;quot; locale. Additionally,
&lt;br&gt;at least one of those things is not blank/empty/missing, so you
&lt;br&gt;certainly know which locale I want. I expect best-effort.
&lt;br&gt;I even called bind_textdomain_codeset, so UTF-8 is explicit.
&lt;br&gt;&lt;br&gt;Had I set nothing, I still wouldn't be asking for &amp;quot;C&amp;quot;. You could
&lt;br&gt;give me a &amp;quot;generic.UTF-8&amp;quot; or &amp;quot;NULL.UTF-8&amp;quot; locale that works.
&lt;br&gt;&lt;br&gt;BTW, even the strings being passed to gettext() are UTF-8.
&lt;br&gt;I have things like the elipsis, so it's still UTF-8 even when the
&lt;br&gt;translation is dumped on the floor.
&lt;br&gt;&lt;br&gt;&amp;gt; But I agree with you that it would be useful if more Linux distributors
&lt;br&gt;&amp;gt; would install an en_US.UTF-8 locale always.
&lt;br&gt;&lt;br&gt;Debian seems to have chosen to add C.UTF-8. From my reading of
&lt;br&gt;the code, it looks like that will fail. They'll patch it I'm sure.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---Utils---Bugs-f1828.html&quot; embed=&quot;fixTarget[1828]&quot; target=&quot;_top&quot; &gt;Gnu - Utils - Bugs&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/supporting-obscure-languages-tp26538776p26556773.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26554260</id>
	<title>Re: supporting obscure languages</title>
	<published>2009-11-28T07:49:03Z</published>
	<updated>2009-11-28T07:49:03Z</updated>
	<author>
		<name>Bruno Haible</name>
	</author>
	<content type="html">Hello Albert,
&lt;br&gt;&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; All I care about: LC_MESSAGES for &amp;quot;zam&amp;quot;, LC_CTYPE not lobotomized
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Then your workaround of doing
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;LANGUAGE=zam LC_ALL=fr_FR.UTF-8
&lt;br&gt;&amp;gt; &amp;gt; is just fine.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Don't you think that is terribly gross? (French with
&lt;br&gt;&amp;gt; different words!)
&lt;br&gt;&lt;br&gt;It is similar to LC_MESSAGES=zam_MX.UTF-8 LANG=fr_FR.UTF-8, which would
&lt;br&gt;be a perfectly reasonable choice for a user with French preferences but
&lt;br&gt;Zapotec language. POSIX allows users to combines different aspects of
&lt;br&gt;locales in this way.
&lt;br&gt;&lt;br&gt;&amp;gt; Don't you think it's doubly gross to have a program
&lt;br&gt;&amp;gt; calling setenv() to control a library via environment
&lt;br&gt;&amp;gt; variables intended for users instead of a proper API?
&lt;br&gt;&amp;gt; ... setenv as an API
&lt;br&gt;&amp;gt; is really disturbing. I greatly prefer to treat the environment
&lt;br&gt;&amp;gt; as read-only.
&lt;br&gt;&lt;br&gt;It is gross, but it is consequence of your desire to use a language
&lt;br&gt;for which the locale is not existent or not installed, and therefore
&lt;br&gt;to do in your program what normally the users do in their system. This is
&lt;br&gt;not typical. The normal case is that users set their preferences in a
&lt;br&gt;central location and these preferences get transmitted to the programs via
&lt;br&gt;environment variables.
&lt;br&gt;&lt;br&gt;&amp;gt; The library doesn't even get immediate notice that there
&lt;br&gt;&amp;gt; has been a change unless you have evil hooks into the
&lt;br&gt;&amp;gt; setenv and getenv functions.
&lt;br&gt;&lt;br&gt;You don't have such hooks in the setlocale function either. Sadly.
&lt;br&gt;&lt;br&gt;&amp;gt; I'm depending on some random unrelated locale
&lt;br&gt;&amp;gt; just to get normal UTF-8 behavior.
&lt;br&gt;&lt;br&gt;Yes, this is worrying. But nowadays, on most desktop systems, at least
&lt;br&gt;one user locale is installed, it uses UTF-8 encoding, and you can
&lt;br&gt;enquire it through &amp;nbsp; setlocale(LC_ALL,&amp;quot;&amp;quot;).
&lt;br&gt;&lt;br&gt;The systems with only the &amp;quot;C&amp;quot; locale are small-memory devices like
&lt;br&gt;routers.
&lt;br&gt;&lt;br&gt;&amp;gt; &amp;gt; No, when you call setlocale(LC_ALL,&amp;quot;&amp;quot;) it uses the locale that the
&lt;br&gt;&amp;gt; &amp;gt; user has set, not &amp;quot;C&amp;quot;.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I mean when the user has done nothing either. The &amp;quot;&amp;quot; doesn't
&lt;br&gt;&amp;gt; get filled in by some environment variable. You make it all the
&lt;br&gt;&amp;gt; way to the lowest-priority environment variable (&amp;quot;LANG&amp;quot;) and
&lt;br&gt;&amp;gt; still have &amp;quot;&amp;quot;. At that point, the implementation-specific locale
&lt;br&gt;&amp;gt; is chosen... and it is &amp;quot;C&amp;quot;.
&lt;br&gt;&lt;br&gt;If you are in this case, you are either on a misconfigured desktop
&lt;br&gt;system, or on a small-memory system on which your program is likely
&lt;br&gt;not meant to run.
&lt;br&gt;&lt;br&gt;&amp;gt; Basically: use what is there, and assume something close
&lt;br&gt;&amp;gt; to &amp;quot;C.UTF-8&amp;quot; for anything missing/broken. Maybe you could
&lt;br&gt;&amp;gt; find choices that are more generic than &amp;quot;C&amp;quot;, like 24-hour time
&lt;br&gt;&amp;gt; and PA4 paper size. Maybe round-trip the case for U+1E9E,
&lt;br&gt;&amp;gt; avoiding expansion troubles. You could call it &amp;quot;default.UTF-8&amp;quot;.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; The details aren't terribly critical; the main thing is to let a
&lt;br&gt;&amp;gt; random loose UTF-8 *.mo file work without hacks or fuss,
&lt;br&gt;&amp;gt; along with the wchar_t functions working beyond ASCII.
&lt;br&gt;&lt;br&gt;Internationalization of a program consists of three parts:
&lt;br&gt;&amp;nbsp; 1) Make use of the Unicode character set.
&lt;br&gt;&amp;nbsp; 2) Provide translations for messages.
&lt;br&gt;&amp;nbsp; 3) Do the following in a locale dependent way: display of time,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;display of currency, computations with calendar, display of
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Hanzi ideographs (Chinese vs. Japanese - same Unicode code
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;point, different glyphs), form for entering a postal address,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;arrangement of GUI components (right-to-left), etc.
&lt;br&gt;&lt;br&gt;With a &amp;quot;C&amp;quot; locale in UTF-8 encoding, you would get part 1). You would
&lt;br&gt;not get part 2), because gettext() must not use the translation message
&lt;br&gt;catalogs in the &amp;quot;C&amp;quot; locale. You would also not get part 3), because
&lt;br&gt;strftime etc. also must not use localized values in the &amp;quot;C&amp;quot; locale.
&lt;br&gt;That's because in POSIX, the &amp;quot;C&amp;quot; locale is the locale to be set when you
&lt;br&gt;want to know ahead of time the output format of &amp;quot;ls&amp;quot;, &amp;quot;df&amp;quot;, &amp;quot;date&amp;quot; etc.
&lt;br&gt;&lt;br&gt;Conclusion: In general, a program cannot be internationalized if it
&lt;br&gt;relies on the &amp;quot;C&amp;quot; locale.
&lt;br&gt;&lt;br&gt;Therefore only few program would profit from a &amp;quot;C&amp;quot; locale in UTF-8
&lt;br&gt;encoding.
&lt;br&gt;&lt;br&gt;But I agree with you that it would be useful if more Linux distributors
&lt;br&gt;would install an en_US.UTF-8 locale always.
&lt;br&gt;&lt;br&gt;Bruno
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---Utils---Bugs-f1828.html&quot; embed=&quot;fixTarget[1828]&quot; target=&quot;_top&quot; &gt;Gnu - Utils - Bugs&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/supporting-obscure-languages-tp26538776p26554260.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26553268</id>
	<title>Re: supporting obscure languages</title>
	<published>2009-11-28T05:47:21Z</published>
	<updated>2009-11-28T05:47:21Z</updated>
	<author>
		<name>Bruno Haible</name>
	</author>
	<content type="html">Eric Blake wrote:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; b. The &amp;quot;C&amp;quot; locale is not UTF-8. (this need not be the case)
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; The &amp;quot;C&amp;quot; locale was defined at a time when there was no UTF-8. This
&lt;br&gt;&amp;gt; &amp;gt; choice accommodates for output devices that cannot display arbitrary
&lt;br&gt;&amp;gt; &amp;gt; Unicode characters (think of ssh into an older Unix system).
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; But POSIX explicitly allows the &amp;quot;C&amp;quot; locale to use UTF-8, and in fact, that
&lt;br&gt;&amp;gt; is the case on cygwin 1.7.
&lt;br&gt;&lt;br&gt;True. It's an implementation choice whether the &amp;quot;C&amp;quot; locale is in US-ASCII or
&lt;br&gt;UTF-8. In glibc, you would only have to change 1 file: glibc/locale/C-ctype.c.
&lt;br&gt;Or you can create a C.UTF-8 locale for yourself, using 'localedef'.
&lt;br&gt;&lt;br&gt;But it would not help Albert's problem: When the LC_MESSAGES locale is &amp;quot;C&amp;quot;,
&lt;br&gt;translations are disabled, regardless of the LANGUAGE environment variable.
&lt;br&gt;This is required for POSIX compatibility of tools (such as &amp;quot;cp&amp;quot; or &amp;quot;tar&amp;quot;)
&lt;br&gt;which use gettext() for their internationalization.
&lt;br&gt;&lt;br&gt;Bruno
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---Utils---Bugs-f1828.html&quot; embed=&quot;fixTarget[1828]&quot; target=&quot;_top&quot; &gt;Gnu - Utils - Bugs&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/supporting-obscure-languages-tp26538776p26553268.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26553045</id>
	<title>Re: supporting obscure languages</title>
	<published>2009-11-28T05:14:09Z</published>
	<updated>2009-11-28T05:14:09Z</updated>
	<author>
		<name>Eric Blake</name>
	</author>
	<content type="html">-----BEGIN PGP SIGNED MESSAGE-----
&lt;br&gt;Hash: SHA1
&lt;br&gt;&lt;br&gt;According to Bruno Haible on 11/28/2009 3:34 AM:
&lt;br&gt;&amp;gt;&amp;gt; b. The &amp;quot;C&amp;quot; locale is not UTF-8. (this need not be the case)
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; The &amp;quot;C&amp;quot; locale was defined at a time when there was no UTF-8. This
&lt;br&gt;&amp;gt; choice accommodates for output devices that cannot display arbitrary
&lt;br&gt;&amp;gt; Unicode characters (think of ssh into an older Unix system).
&lt;br&gt;&lt;br&gt;But POSIX explicitly allows the &amp;quot;C&amp;quot; locale to use UTF-8, and in fact, that
&lt;br&gt;is the case on cygwin 1.7. &amp;nbsp;Per POSIX, the &amp;quot;C&amp;quot; locale is only portable for
&lt;br&gt;character operations for bytes &amp;lt; 128.
&lt;br&gt;&lt;br&gt;- --
&lt;br&gt;Don't work too hard, make some time for fun as well!
&lt;br&gt;&lt;br&gt;Eric Blake &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26553045&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ebb9@...&lt;/a&gt;
&lt;br&gt;-----BEGIN PGP SIGNATURE-----
&lt;br&gt;Version: GnuPG v1.4.9 (Cygwin)
&lt;br&gt;Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
&lt;br&gt;Comment: Using GnuPG with Mozilla - &lt;a href=&quot;http://enigmail.mozdev.org/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://enigmail.mozdev.org/&lt;/a&gt;&lt;br&gt;&lt;br&gt;iEYEARECAAYFAksRIiEACgkQ84KuGfSFAYAyPQCdHbfP/UQ57rkWeqVRLrwpN/PN
&lt;br&gt;xEYAn1pkhQtHYFYA0yUGRgvha9EDhOca
&lt;br&gt;=sAbk
&lt;br&gt;-----END PGP SIGNATURE-----
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---Utils---Bugs-f1828.html&quot; embed=&quot;fixTarget[1828]&quot; target=&quot;_top&quot; &gt;Gnu - Utils - Bugs&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/supporting-obscure-languages-tp26538776p26553045.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26554432</id>
	<title>Re: supporting obscure languages</title>
	<published>2009-11-28T05:02:40Z</published>
	<updated>2009-11-28T05:02:40Z</updated>
	<author>
		<name>Albert Cahalan</name>
	</author>
	<content type="html">On Sat, Nov 28, 2009 at 5:34 AM, Bruno Haible &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26554432&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;bruno@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; Albert Cahalan wrote:
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; I don't need month name, time display rules, telephone formats...
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; All I care about: LC_MESSAGES for &amp;quot;zam&amp;quot;, LC_CTYPE not lobotomized
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Then your workaround of doing
&lt;br&gt;&amp;gt; &amp;nbsp;LANGUAGE=zam LC_ALL=fr_FR.UTF-8
&lt;br&gt;&amp;gt; is just fine.
&lt;br&gt;&lt;br&gt;Don't you think that is terribly gross? (French with
&lt;br&gt;different words!)
&lt;br&gt;&lt;br&gt;Don't you think it's doubly gross to have a program
&lt;br&gt;calling setenv() to control a library via environment
&lt;br&gt;variables intended for users instead of a proper API?
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; BTW, we'd like fallback to similar translations in case something
&lt;br&gt;&amp;gt;&amp;gt; is missing. When zh_TW.mo lacks something, zh_CN.mo should be the
&lt;br&gt;&amp;gt;&amp;gt; next place to look.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; That's a built-in feature in GNU gettext: just set the LANGUAGE variable to
&lt;br&gt;&amp;gt; &amp;nbsp;zh_TW:zh_CN
&lt;br&gt;&amp;gt; and you're done.
&lt;br&gt;&lt;br&gt;I guess we'll probably do that. Still, setenv as an API
&lt;br&gt;is really disturbing. I greatly prefer to treat the environment
&lt;br&gt;as read-only.
&lt;br&gt;&lt;br&gt;The library doesn't even get immediate notice that there
&lt;br&gt;has been a change unless you have evil hooks into the
&lt;br&gt;setenv and getenv functions. You'd have to either do a
&lt;br&gt;slow getenv each time, or cache the value and hope the
&lt;br&gt;program doesn't try to change things later.
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; setlocale(LC_ALL, loc); &amp;nbsp;// loc=&amp;quot;&amp;quot; or loc=&amp;quot;zam&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; ctype_utf8(); &amp;nbsp;// setlocale(LC_CTYPE,x) for many x until iswprint works
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Yes, you have no guarantee that a particular locale is installed on the user's
&lt;br&gt;&amp;gt; system. You have to try some. setlocale(LC_ALL, &amp;quot;&amp;quot;) is a good first guess.
&lt;br&gt;&lt;br&gt;That guess is just &amp;quot;C&amp;quot; on my system.
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; My current hack: LANGUAGE=zam LC_ALL=fr_FR.UTF-8
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Yep, I'm telling gettext that this is French. That's disgusting.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; No, you are telling the system to use an UTF-8 encoding for strings,
&lt;br&gt;&amp;gt; French rules for time, sorting, numbers etc, and Zapotec for messages.
&lt;br&gt;&amp;gt; If it fits well with your program, all fine.
&lt;br&gt;&lt;br&gt;Eh, the Zapotec dialect of French. It does work, as long as
&lt;br&gt;the user happens to have fr_FR.UTF-8 installed.
&lt;br&gt;&lt;br&gt;That's trouble. I'm depending on some random unrelated locale
&lt;br&gt;just to get normal UTF-8 behavior.
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; There are quite a few design bugs here, none of which would cause
&lt;br&gt;&amp;gt;&amp;gt; huge problems all by itself. Together, they are a disaster.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; a. The implementation-specific &amp;quot;&amp;quot; locale is &amp;quot;C&amp;quot;. (it need not be)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; No, when you call setlocale(LC_ALL,&amp;quot;&amp;quot;) it uses the locale that the
&lt;br&gt;&amp;gt; user has set, not &amp;quot;C&amp;quot;.
&lt;br&gt;&lt;br&gt;I mean when the user has done nothing either. The &amp;quot;&amp;quot; doesn't
&lt;br&gt;get filled in by some environment variable. You make it all the
&lt;br&gt;way to the lowest-priority environment variable (&amp;quot;LANG&amp;quot;) and
&lt;br&gt;still have &amp;quot;&amp;quot;. At that point, the implementation-specific locale
&lt;br&gt;is chosen... and it is &amp;quot;C&amp;quot;.
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; b. The &amp;quot;C&amp;quot; locale is not UTF-8. (this need not be the case)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The &amp;quot;C&amp;quot; locale was defined at a time when there was no UTF-8. This
&lt;br&gt;&amp;gt; choice accommodates for output devices that cannot display arbitrary
&lt;br&gt;&amp;gt; Unicode characters (think of ssh into an older Unix system).
&lt;br&gt;&lt;br&gt;I can sort of understand this. I own a real VT510 terminal.
&lt;br&gt;&lt;br&gt;It's not a working protection though. Linux distributions often
&lt;br&gt;set a UTF-8 locale, then fail to translate or otherwise protect
&lt;br&gt;logins on the serial tty devices. This happens to be why procps
&lt;br&gt;replaces UTF-8 characters containing the 0x9b byte. (but of
&lt;br&gt;course that is potentially hostile data, not translations, and
&lt;br&gt;Red Hat patches out the protection anyway)
&lt;br&gt;&lt;br&gt;Having &amp;quot;C&amp;quot; not be i18n-friendly (serving up UTF-8 messages
&lt;br&gt;and full Unicode on wchar_t) wouldn't be a big deal except
&lt;br&gt;for the fact that the locale so easily ends up being &amp;quot;C&amp;quot;.
&lt;br&gt;(when unspecified, when a locale is broken/unknown, etc.)
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; c. The &amp;quot;C&amp;quot; locale makes iswprint((wchar_t)0xf7) be false. (very bad)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I agree with you that wide characters are a mess in ISO C, because the
&lt;br&gt;&amp;gt; meaning of (wchar_t)0xf7 depends on locales: in some locale it may be
&lt;br&gt;&amp;gt; a DIVISION SIGN, in another one a CYRILLIC SMALL LETTER YI, in another
&lt;br&gt;&amp;gt; one a LATIN SMALL LETTER S WITH ACUTE, and in another one it's invalid.
&lt;br&gt;&lt;br&gt;Locales with non-Unicode wchar_t are far worse than locales
&lt;br&gt;with non-UTF-8 char. Lots of software breaks, and nobody will
&lt;br&gt;fix it. There comes a time to deprecate dysfunctional locales.
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; d. The &amp;quot;C&amp;quot; locale ignores LC_MESSAGES, even if not &amp;quot;C&amp;quot;.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; What do you expect the system to do when you set LC_ALL to &amp;quot;C&amp;quot; and
&lt;br&gt;&amp;gt; then LC_MESSAGES to &amp;quot;zh_CN&amp;quot;? All characters are US-ASCII but messages
&lt;br&gt;&amp;gt; should be in Chinese? In earlier versions of glibc, the Chinese strings
&lt;br&gt;&amp;gt; were converted to &amp;quot;?????? ??? ?????? 32 ?????&amp;quot; before being displayed.
&lt;br&gt;&amp;gt; This was not really helpful; so now the translations are ignored
&lt;br&gt;&amp;gt; entirely in this case.
&lt;br&gt;&lt;br&gt;Just be binary-clean. Remember why UTF-8 was invented.
&lt;br&gt;If glibc were binary clean, messages would normally just work.
&lt;br&gt;They would certainly work for typical GUI stuff using Pango,
&lt;br&gt;and would even work in many terminal situations.
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; e. The locale reverts to &amp;quot;C&amp;quot; if some portion is missing/unknown.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; What's wrong with having a fallback if some portion is missing?
&lt;br&gt;&lt;br&gt;Nothing. The problem is how this interacts with the other stuff.
&lt;br&gt;If the fallback were something like &amp;quot;C.UTF-8&amp;quot; or the &amp;quot;C&amp;quot; locale
&lt;br&gt;wasn't severely limited, there would be no problem.
&lt;br&gt;&lt;br&gt;It's only the combination of all these design issues that results in
&lt;br&gt;a problem. Individually, no one design issue is really a problem.
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; The result is that none of these work:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; a. setlocale(LC_ALL,&amp;quot;zam&amp;quot;);
&lt;br&gt;&amp;gt;&amp;gt; b. setlocale(LC_MESSAGES,&amp;quot;zam&amp;quot;);
&lt;br&gt;&amp;gt;&amp;gt; c. setlocale(LC_MESSAGES,&amp;quot;zam&amp;quot;); setlocale(LC_CTYPE,&amp;quot;UTF-8&amp;quot;);
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; None of these work because you don't have a &amp;quot;zam&amp;quot; locale installed in
&lt;br&gt;&amp;gt; the first place. setlocale is about designating locales to use.
&lt;br&gt;&lt;br&gt;I have a piece of a locale installed. (my &amp;quot;zam.mo&amp;quot; file)
&lt;br&gt;To use that, I mainly just need a binary-clean library.
&lt;br&gt;Getting iswprint() and towupper() would be nice too, but
&lt;br&gt;it's not a huge problem for me to write my own.
&lt;br&gt;&lt;br&gt;Basically: use what is there, and assume something close
&lt;br&gt;to &amp;quot;C.UTF-8&amp;quot; for anything missing/broken. Maybe you could
&lt;br&gt;find choices that are more generic than &amp;quot;C&amp;quot;, like 24-hour time
&lt;br&gt;and PA4 paper size. Maybe round-trip the case for U+1E9E,
&lt;br&gt;avoiding expansion troubles. You could call it &amp;quot;default.UTF-8&amp;quot;.
&lt;br&gt;&lt;br&gt;The details aren't terribly critical; the main thing is to let a
&lt;br&gt;random loose UTF-8 *.mo file work without hacks or fuss,
&lt;br&gt;along with the wchar_t functions working beyond ASCII.
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; There just doesn't seem to be any reasonable way to kick gettext into
&lt;br&gt;&amp;gt;&amp;gt; UTF-8 mode and feed it a *.mo file.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; You found the way and showed it to us.
&lt;br&gt;&lt;br&gt;Trying random unrelated locales and calling putenv() is
&lt;br&gt;pretty far from reasonable IMHO.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---Utils---Bugs-f1828.html&quot; embed=&quot;fixTarget[1828]&quot; target=&quot;_top&quot; &gt;Gnu - Utils - Bugs&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/supporting-obscure-languages-tp26538776p26554432.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26551936</id>
	<title>Re: supporting obscure languages</title>
	<published>2009-11-28T02:34:55Z</published>
	<updated>2009-11-28T02:34:55Z</updated>
	<author>
		<name>Bruno Haible</name>
	</author>
	<content type="html">Albert Cahalan wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Well, that's the language I'm currently using for testing.
&lt;br&gt;&amp;gt; I'm sure it's not the only thing failing. I have:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; af.po &amp;nbsp; de.po &amp;nbsp; &amp;nbsp; fi.po &amp;nbsp; id.po &amp;nbsp;nb.po &amp;nbsp; &amp;nbsp; shs.po &amp;nbsp;tlh.po
&lt;br&gt;&amp;gt; ar.po &amp;nbsp; el.po &amp;nbsp; &amp;nbsp; fo.po &amp;nbsp; is.po &amp;nbsp;nl.po &amp;nbsp; &amp;nbsp; sk.po &amp;nbsp; tr.po
&lt;br&gt;&amp;gt; ast.po &amp;nbsp;en_AU.po &amp;nbsp;fr.po &amp;nbsp; it.po &amp;nbsp;nn.po &amp;nbsp; &amp;nbsp; sl.po &amp;nbsp; twi.po
&lt;br&gt;&amp;gt; az.po &amp;nbsp; en_CA.po &amp;nbsp;ga.po &amp;nbsp; ja.po &amp;nbsp;nr.po &amp;nbsp; &amp;nbsp; son.po &amp;nbsp;uk.po
&lt;br&gt;&amp;gt; be.po &amp;nbsp; en_GB.po &amp;nbsp;gd.po &amp;nbsp; ka.po &amp;nbsp;oc.po &amp;nbsp; &amp;nbsp; sq.po &amp;nbsp; ve.po
&lt;br&gt;&amp;gt; bg.po &amp;nbsp; en_ZA.po &amp;nbsp;gl.po &amp;nbsp; km.po &amp;nbsp;oj.po &amp;nbsp; &amp;nbsp; sr.po &amp;nbsp; vi.po
&lt;br&gt;&amp;gt; bo.po &amp;nbsp; eo.po &amp;nbsp; &amp;nbsp; gos.po &amp;nbsp;ko.po &amp;nbsp;pl.po &amp;nbsp; &amp;nbsp; sv.po &amp;nbsp; wa.po
&lt;br&gt;&amp;gt; br.po &amp;nbsp; es.po &amp;nbsp; &amp;nbsp; gu.po &amp;nbsp; ku.po &amp;nbsp;pt.po &amp;nbsp; &amp;nbsp; sw.po &amp;nbsp; wo.po
&lt;br&gt;&amp;gt; ca.po &amp;nbsp; es_MX.po &amp;nbsp;he.po &amp;nbsp; lt.po &amp;nbsp;pt_BR.po &amp;nbsp;ta.po &amp;nbsp; xh.po
&lt;br&gt;&amp;gt; cs.po &amp;nbsp; et.po &amp;nbsp; &amp;nbsp; hi.po &amp;nbsp; lv.po &amp;nbsp;ro.po &amp;nbsp; &amp;nbsp; te.po &amp;nbsp; zam.po
&lt;br&gt;&amp;gt; cy.po &amp;nbsp; eu.po &amp;nbsp; &amp;nbsp; hr.po &amp;nbsp; mk.po &amp;nbsp;ru.po &amp;nbsp; &amp;nbsp; th.po &amp;nbsp; zh_CN.po
&lt;br&gt;&amp;gt; da.po &amp;nbsp; fa.po &amp;nbsp; &amp;nbsp; hu.po &amp;nbsp; ms.po &amp;nbsp;rw.po &amp;nbsp; &amp;nbsp; tl.po &amp;nbsp; zh_TW.po
&lt;/div&gt;&lt;br&gt;84 languages! That is impressing. The largest number of translations
&lt;br&gt;of a package in the Translation Project is currently 58 languages.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; &amp;gt; 2) You may need to define a glibc locale. This is necessary for a
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; distinct language and optional for a variant (need it only if you
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; want to override some localizations). You need it because things
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; like month name, time display rules and the like are not defined
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; by .po files but through a locale definition.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ... Tux Paint sure doesn't need any of that.
&lt;br&gt;&amp;gt; I don't need month name, time display rules, telephone formats...
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; All I care about: LC_MESSAGES for &amp;quot;zam&amp;quot;, LC_CTYPE not lobotomized
&lt;/div&gt;&lt;br&gt;Then your workaround of doing
&lt;br&gt;&amp;nbsp; LANGUAGE=zam LC_ALL=fr_FR.UTF-8
&lt;br&gt;is just fine.
&lt;br&gt;&lt;br&gt;&amp;gt; I need two ways to make this happen. First, via the environment.
&lt;br&gt;&amp;gt; Second, via function calls so that I can have the --locale=zam
&lt;br&gt;&amp;gt; and --lang=zapotec options work.
&lt;br&gt;&lt;br&gt;For the first way, you can refer the user to the GNU gettext documentation
&lt;br&gt;&amp;nbsp; &lt;a href=&quot;http://www.gnu.org/software/gettext/manual/html_node/Users.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.gnu.org/software/gettext/manual/html_node/Users.html&lt;/a&gt;&lt;br&gt;or tell them to set LANGUAGE, if you prefer that.
&lt;br&gt;&lt;br&gt;For the second way, you can call
&lt;br&gt;&amp;nbsp; setenv (&amp;quot;LC_ALL&amp;quot;, &amp;quot;fr_FR.UTF-8&amp;quot;, 1);
&lt;br&gt;&amp;nbsp; setenv (&amp;quot;LANGUAGE&amp;quot;, &amp;quot;zam&amp;quot;, 1);
&lt;br&gt;&lt;br&gt;&amp;gt; BTW, we'd like fallback to similar translations in case something
&lt;br&gt;&amp;gt; is missing. When zh_TW.mo lacks something, zh_CN.mo should be the
&lt;br&gt;&amp;gt; next place to look.
&lt;br&gt;&lt;br&gt;That's a built-in feature in GNU gettext: just set the LANGUAGE variable to
&lt;br&gt;&amp;nbsp; zh_TW:zh_CN
&lt;br&gt;and you're done.
&lt;br&gt;&lt;br&gt;&amp;gt; I end up with glibc's broken &amp;quot;C&amp;quot; locale.
&lt;br&gt;&amp;gt; Tux Paint's code does this now:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; setlocale(LC_ALL, loc); &amp;nbsp;// loc=&amp;quot;&amp;quot; or loc=&amp;quot;zam&amp;quot;
&lt;br&gt;&amp;gt; ctype_utf8(); &amp;nbsp;// setlocale(LC_CTYPE,x) for many x until iswprint works
&lt;br&gt;&lt;br&gt;Yes, you have no guarantee that a particular locale is installed on the user's
&lt;br&gt;system. You have to try some. setlocale(LC_ALL, &amp;quot;&amp;quot;) is a good first guess.
&lt;br&gt;&lt;br&gt;&amp;gt; bindtextdomain(&amp;quot;tuxpaint&amp;quot;, LOCALEDIR);
&lt;br&gt;&amp;gt; bind_textdomain_codeset(&amp;quot;tuxpaint&amp;quot;, &amp;quot;UTF-8&amp;quot;);
&lt;br&gt;&amp;gt; textdomain(&amp;quot;tuxpaint&amp;quot;);
&lt;br&gt;&lt;br&gt;Right.
&lt;br&gt;&lt;br&gt;&amp;gt; The i18n source is here:
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://tuxpaint.cvs.sf.net/viewvc/tuxpaint/tuxpaint/src/i18n.c?revision=1.72&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://tuxpaint.cvs.sf.net/viewvc/tuxpaint/tuxpaint/src/i18n.c?revision=1.72&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; The interesting stuff starts in the set_current_locale(char *locale)
&lt;br&gt;&amp;gt; function, with the requested locale being &amp;quot;&amp;quot; or from the command line.
&lt;br&gt;&lt;br&gt;Looks reasonable.
&lt;br&gt;&lt;br&gt;&amp;gt; My current hack: LANGUAGE=zam LC_ALL=fr_FR.UTF-8
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Yep, I'm telling gettext that this is French. That's disgusting.
&lt;br&gt;&lt;br&gt;No, you are telling the system to use an UTF-8 encoding for strings,
&lt;br&gt;French rules for time, sorting, numbers etc, and Zapotec for messages.
&lt;br&gt;If it fits well with your program, all fine.
&lt;br&gt;&lt;br&gt;&amp;gt; There are quite a few design bugs here, none of which would cause
&lt;br&gt;&amp;gt; huge problems all by itself. Together, they are a disaster.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; a. The implementation-specific &amp;quot;&amp;quot; locale is &amp;quot;C&amp;quot;. (it need not be)
&lt;br&gt;&lt;br&gt;No, when you call setlocale(LC_ALL,&amp;quot;&amp;quot;) it uses the locale that the
&lt;br&gt;user has set, not &amp;quot;C&amp;quot;.
&lt;br&gt;&lt;br&gt;&amp;gt; b. The &amp;quot;C&amp;quot; locale is not UTF-8. (this need not be the case)
&lt;br&gt;&lt;br&gt;The &amp;quot;C&amp;quot; locale was defined at a time when there was no UTF-8. This
&lt;br&gt;choice accommodates for output devices that cannot display arbitrary
&lt;br&gt;Unicode characters (think of ssh into an older Unix system).
&lt;br&gt;&lt;br&gt;&amp;gt; c. The &amp;quot;C&amp;quot; locale makes iswprint((wchar_t)0xf7) be false. (very bad)
&lt;br&gt;&lt;br&gt;I agree with you that wide characters are a mess in ISO C, because the
&lt;br&gt;meaning of (wchar_t)0xf7 depends on locales: in some locale it may be
&lt;br&gt;a DIVISION SIGN, in another one a CYRILLIC SMALL LETTER YI, in another
&lt;br&gt;one a LATIN SMALL LETTER S WITH ACUTE, and in another one it's invalid.
&lt;br&gt;&lt;br&gt;&amp;gt; d. The &amp;quot;C&amp;quot; locale ignores LC_MESSAGES, even if not &amp;quot;C&amp;quot;.
&lt;br&gt;&lt;br&gt;What do you expect the system to do when you set LC_ALL to &amp;quot;C&amp;quot; and
&lt;br&gt;then LC_MESSAGES to &amp;quot;zh_CN&amp;quot;? All characters are US-ASCII but messages
&lt;br&gt;should be in Chinese? In earlier versions of glibc, the Chinese strings
&lt;br&gt;were converted to &amp;quot;?????? ??? ?????? 32 ?????&amp;quot; before being displayed.
&lt;br&gt;This was not really helpful; so now the translations are ignored
&lt;br&gt;entirely in this case.
&lt;br&gt;&lt;br&gt;&amp;gt; e. The locale reverts to &amp;quot;C&amp;quot; if some portion is missing/unknown.
&lt;br&gt;&lt;br&gt;What's wrong with having a fallback if some portion is missing?
&lt;br&gt;&lt;br&gt;&amp;gt; The result is that none of these work:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; a. setlocale(LC_ALL,&amp;quot;zam&amp;quot;);
&lt;br&gt;&amp;gt; b. setlocale(LC_MESSAGES,&amp;quot;zam&amp;quot;);
&lt;br&gt;&amp;gt; c. setlocale(LC_MESSAGES,&amp;quot;zam&amp;quot;); setlocale(LC_CTYPE,&amp;quot;UTF-8&amp;quot;);
&lt;br&gt;&lt;br&gt;None of these work because you don't have a &amp;quot;zam&amp;quot; locale installed in
&lt;br&gt;the first place. setlocale is about designating locales to use.
&lt;br&gt;&lt;br&gt;&amp;gt; There just doesn't seem to be any reasonable way to kick gettext into
&lt;br&gt;&amp;gt; UTF-8 mode and feed it a *.mo file.
&lt;br&gt;&lt;br&gt;You found the way and showed it to us.
&lt;br&gt;&lt;br&gt;Bruno
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---Utils---Bugs-f1828.html&quot; embed=&quot;fixTarget[1828]&quot; target=&quot;_top&quot; &gt;Gnu - Utils - Bugs&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/supporting-obscure-languages-tp26538776p26551936.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26551494</id>
	<title>Re: supporting obscure languages</title>
	<published>2009-11-28T01:28:57Z</published>
	<updated>2009-11-28T01:28:57Z</updated>
	<author>
		<name>Bruno Haible</name>
	</author>
	<content type="html">John Cowan wrote:
&lt;br&gt;&amp;gt; Is there any reason why ISO 639-3 identifiers cannot be used for
&lt;br&gt;&amp;gt; appropriate languages? &amp;nbsp;639-3 is much more comprehensive than 639-2, and
&lt;br&gt;&amp;gt; the identifiers correspond (that is, since 'haw' is Hawaiian in 639-2,
&lt;br&gt;&amp;gt; it has the same meaning in 639-3).
&lt;br&gt;&lt;br&gt;ISO 639-2 has stronger rules about stability: Codes in ISO 639-2/B will not
&lt;br&gt;be changed, and the other ISO 639-2 can be changed, but an old code will not
&lt;br&gt;be reused for another language for 5 years. Whereas in ISO 639-3 there are
&lt;br&gt;large changes every year [1].
&lt;br&gt;&lt;br&gt;&amp;gt; In short, unless there is some technical barrier to using 639-3 code
&lt;br&gt;&amp;gt; elements, it is more appropriate to code this language as &amp;quot;zam&amp;quot; rather
&lt;br&gt;&amp;gt; than as &amp;quot;zap@miahuatlan&amp;quot;.
&lt;br&gt;&lt;br&gt;From the linguistic point of view, you may be right.
&lt;br&gt;&lt;br&gt;From the point of stability of the code, if you choose &amp;quot;zam&amp;quot;, you have to
&lt;br&gt;consider the possibility that the code be changed at some point in the
&lt;br&gt;future. This is not impossible to do - we had a change from 'no@nynorsk' to
&lt;br&gt;'nn' a couple of years ago - but it causes trouble to the users of that
&lt;br&gt;language for some years.
&lt;br&gt;&lt;br&gt;Bruno
&lt;br&gt;&lt;br&gt;[1] &lt;a href=&quot;http://www.sil.org/iso639-3/changes.asp&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.sil.org/iso639-3/changes.asp&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---Utils---Bugs-f1828.html&quot; embed=&quot;fixTarget[1828]&quot; target=&quot;_top&quot; &gt;Gnu - Utils - Bugs&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/supporting-obscure-languages-tp26538776p26551494.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26549558</id>
	<title>Re: supporting obscure languages</title>
	<published>2009-11-27T15:09:12Z</published>
	<updated>2009-11-27T15:09:12Z</updated>
	<author>
		<name>Albert Cahalan</name>
	</author>
	<content type="html">On Fri, Nov 27, 2009 at 7:42 AM, Bruno Haible &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26549558&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;bruno@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; You did not state what you are trying to do. I understand it like this:
&lt;br&gt;&amp;gt; &amp;quot;How do I add support for a specific, rarely used language to my system
&lt;br&gt;&amp;gt; &amp;nbsp;in such a way that I can localize programs for this language?&amp;quot;
&lt;br&gt;&lt;br&gt;I'm interested in that, and I think it should be trivial, but I'm
&lt;br&gt;actually dealing with this from the view of a software developer
&lt;br&gt;with existing *.mo files. I'm working on Tux Paint.
&lt;br&gt;&lt;br&gt;(think of the children)
&lt;br&gt;&lt;br&gt;At this point I'm seriously considering ripping out the gettext
&lt;br&gt;stuff because it is fighting me every step of the way. It looks
&lt;br&gt;like less trouble to write my own; we already do this for audio
&lt;br&gt;and fonts. I hope you wish for gettext to be easy to work with.
&lt;br&gt;&lt;br&gt;&amp;gt; 1) You need to define a locale identifier for it. This is important,
&lt;br&gt;&amp;gt; &amp;nbsp; because the users and all translators must agree on it - if a
&lt;br&gt;&amp;gt; &amp;nbsp; translator uses a different identifier than the user, her
&lt;br&gt;&amp;gt; &amp;nbsp; translations will not be found. The standardized identifiers
&lt;br&gt;&amp;gt; &amp;nbsp; are those in ISO 639-1 and ISO 639-2, and also found in glibc's
&lt;br&gt;&amp;gt; &amp;nbsp; glibc/locale/iso-639.def.
&lt;br&gt;&lt;br&gt;Done. It's some Zapotec thing that I know very little about.
&lt;br&gt;I'm not the translator. The translator(s) decided, and I'm
&lt;br&gt;certainly not about to argue.
&lt;br&gt;&lt;br&gt;Well, that's the language I'm currently using for testing.
&lt;br&gt;I'm sure it's not the only thing failing. I have:
&lt;br&gt;&lt;br&gt;af.po &amp;nbsp; de.po &amp;nbsp; &amp;nbsp; fi.po &amp;nbsp; id.po &amp;nbsp;nb.po &amp;nbsp; &amp;nbsp; shs.po &amp;nbsp;tlh.po
&lt;br&gt;ar.po &amp;nbsp; el.po &amp;nbsp; &amp;nbsp; fo.po &amp;nbsp; is.po &amp;nbsp;nl.po &amp;nbsp; &amp;nbsp; sk.po &amp;nbsp; tr.po
&lt;br&gt;ast.po &amp;nbsp;en_AU.po &amp;nbsp;fr.po &amp;nbsp; it.po &amp;nbsp;nn.po &amp;nbsp; &amp;nbsp; sl.po &amp;nbsp; twi.po
&lt;br&gt;az.po &amp;nbsp; en_CA.po &amp;nbsp;ga.po &amp;nbsp; ja.po &amp;nbsp;nr.po &amp;nbsp; &amp;nbsp; son.po &amp;nbsp;uk.po
&lt;br&gt;be.po &amp;nbsp; en_GB.po &amp;nbsp;gd.po &amp;nbsp; ka.po &amp;nbsp;oc.po &amp;nbsp; &amp;nbsp; sq.po &amp;nbsp; ve.po
&lt;br&gt;bg.po &amp;nbsp; en_ZA.po &amp;nbsp;gl.po &amp;nbsp; km.po &amp;nbsp;oj.po &amp;nbsp; &amp;nbsp; sr.po &amp;nbsp; vi.po
&lt;br&gt;bo.po &amp;nbsp; eo.po &amp;nbsp; &amp;nbsp; gos.po &amp;nbsp;ko.po &amp;nbsp;pl.po &amp;nbsp; &amp;nbsp; sv.po &amp;nbsp; wa.po
&lt;br&gt;br.po &amp;nbsp; es.po &amp;nbsp; &amp;nbsp; gu.po &amp;nbsp; ku.po &amp;nbsp;pt.po &amp;nbsp; &amp;nbsp; sw.po &amp;nbsp; wo.po
&lt;br&gt;ca.po &amp;nbsp; es_MX.po &amp;nbsp;he.po &amp;nbsp; lt.po &amp;nbsp;pt_BR.po &amp;nbsp;ta.po &amp;nbsp; xh.po
&lt;br&gt;cs.po &amp;nbsp; et.po &amp;nbsp; &amp;nbsp; hi.po &amp;nbsp; lv.po &amp;nbsp;ro.po &amp;nbsp; &amp;nbsp; te.po &amp;nbsp; zam.po
&lt;br&gt;cy.po &amp;nbsp; eu.po &amp;nbsp; &amp;nbsp; hr.po &amp;nbsp; mk.po &amp;nbsp;ru.po &amp;nbsp; &amp;nbsp; th.po &amp;nbsp; zh_CN.po
&lt;br&gt;da.po &amp;nbsp; fa.po &amp;nbsp; &amp;nbsp; hu.po &amp;nbsp; ms.po &amp;nbsp;rw.po &amp;nbsp; &amp;nbsp; tl.po &amp;nbsp; zh_TW.po
&lt;br&gt;&lt;br&gt;(ever see that many at once before?)
&lt;br&gt;&lt;br&gt;&amp;gt; 2) You may need to define a glibc locale. This is necessary for a
&lt;br&gt;&amp;gt; &amp;nbsp; distinct language and optional for a variant (need it only if you
&lt;br&gt;&amp;gt; &amp;nbsp; want to override some localizations). You need it because things
&lt;br&gt;&amp;gt; &amp;nbsp; like month name, time display rules and the like are not defined
&lt;br&gt;&amp;gt; &amp;nbsp; by .po files but through a locale definition.
&lt;br&gt;&lt;br&gt;Frankly, I don't give a shit. If somebody decides they care, they
&lt;br&gt;can define these things. Tux Paint sure doesn't need any of that.
&lt;br&gt;I don't need month name, time display rules, telephone formats...
&lt;br&gt;&lt;br&gt;All I care about: LC_MESSAGES for &amp;quot;zam&amp;quot;, LC_CTYPE not lobotomized
&lt;br&gt;&lt;br&gt;I need two ways to make this happen. First, via the environment.
&lt;br&gt;Second, via function calls so that I can have the --locale=zam
&lt;br&gt;and --lang=zapotec options work.
&lt;br&gt;&lt;br&gt;&amp;gt; To create a locale, use the
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;quot;localedef&amp;quot; command together with a locale definition file. There
&lt;br&gt;&amp;gt; &amp;nbsp; are dozens of examples of these locale definition files in a
&lt;br&gt;&amp;gt; &amp;nbsp; directory mentioned in the output of &amp;quot;localedef --help&amp;quot;.
&lt;br&gt;&lt;br&gt;That would be complicated sysadmin work. These machines probably
&lt;br&gt;run es_MX.UTF-8 most of the time, or maybe C. Nobody wants to wait
&lt;br&gt;for Fedora or Debian to take their sweet time adding &amp;quot;zam&amp;quot;.
&lt;br&gt;This also, somehow, needs to work for Windows and MacOS X. It will
&lt;br&gt;be a cold day in Hell before Microsoft or Apple supports Zapotec.
&lt;br&gt;&lt;br&gt;&amp;gt; 3) Then you can create .mo files from .po files for that language,
&lt;br&gt;&amp;gt; &amp;nbsp; as described in the GNU gettext documentation.
&lt;br&gt;&lt;br&gt;Done. Tux Paint includes 84 translations.
&lt;br&gt;&lt;br&gt;BTW, we'd like fallback to similar translations in case something
&lt;br&gt;is missing. When zh_TW.mo lacks something, zh_CN.mo should be the
&lt;br&gt;next place to look.
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; How can a program offer a non-environment way to override the source
&lt;br&gt;&amp;gt;&amp;gt; of messages? The obvious setlocale(LC_ALL,&amp;quot;zam&amp;quot;) does not work, nor
&lt;br&gt;&amp;gt;&amp;gt; does the troublesome (because other locales need more) substitution
&lt;br&gt;&amp;gt;&amp;gt; of setlocale(LC_MESSAGES,&amp;quot;zam&amp;quot;).
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; There is setlocale, and there is bindtextdomain. But you should have a
&lt;br&gt;&amp;gt; locale first.
&lt;br&gt;&lt;br&gt;It doesn't work. I end up with glibc's broken &amp;quot;C&amp;quot; locale.
&lt;br&gt;Tux Paint's code does this now:
&lt;br&gt;&lt;br&gt;setlocale(LC_ALL, loc); &amp;nbsp;// loc=&amp;quot;&amp;quot; or loc=&amp;quot;zam&amp;quot;
&lt;br&gt;ctype_utf8(); &amp;nbsp;// setlocale(LC_CTYPE,x) for many x until iswprint works
&lt;br&gt;bindtextdomain(&amp;quot;tuxpaint&amp;quot;, LOCALEDIR);
&lt;br&gt;bind_textdomain_codeset(&amp;quot;tuxpaint&amp;quot;, &amp;quot;UTF-8&amp;quot;);
&lt;br&gt;textdomain(&amp;quot;tuxpaint&amp;quot;);
&lt;br&gt;&lt;br&gt;The i18n source is here:
&lt;br&gt;&lt;a href=&quot;http://tuxpaint.cvs.sf.net/viewvc/tuxpaint/tuxpaint/src/i18n.c?revision=1.72&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://tuxpaint.cvs.sf.net/viewvc/tuxpaint/tuxpaint/src/i18n.c?revision=1.72&lt;/a&gt;&lt;br&gt;&lt;br&gt;The interesting stuff starts in the set_current_locale(char *locale)
&lt;br&gt;function, with the requested locale being &amp;quot;&amp;quot; or from the command line.
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; BTW, please consider it a bug that that doesn't just work.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; No, not a bug. This is the way locales are designed.
&lt;br&gt;&lt;br&gt;That makes it a design bug.
&lt;br&gt;&lt;br&gt;My current hack: LANGUAGE=zam LC_ALL=fr_FR.UTF-8
&lt;br&gt;&lt;br&gt;Yep, I'm telling gettext that this is French. That's disgusting.
&lt;br&gt;&lt;br&gt;There are quite a few design bugs here, none of which would cause
&lt;br&gt;huge problems all by itself. Together, they are a disaster.
&lt;br&gt;&lt;br&gt;a. The implementation-specific &amp;quot;&amp;quot; locale is &amp;quot;C&amp;quot;. (it need not be)
&lt;br&gt;b. The &amp;quot;C&amp;quot; locale is not UTF-8. (this need not be the case)
&lt;br&gt;c. The &amp;quot;C&amp;quot; locale makes iswprint((wchar_t)0xf7) be false. (very bad)
&lt;br&gt;d. The &amp;quot;C&amp;quot; locale ignores LC_MESSAGES, even if not &amp;quot;C&amp;quot;.
&lt;br&gt;e. The locale reverts to &amp;quot;C&amp;quot; if some portion is missing/unknown.
&lt;br&gt;&lt;br&gt;The result is that none of these work:
&lt;br&gt;&lt;br&gt;a. setlocale(LC_ALL,&amp;quot;zam&amp;quot;);
&lt;br&gt;b. setlocale(LC_MESSAGES,&amp;quot;zam&amp;quot;);
&lt;br&gt;c. setlocale(LC_MESSAGES,&amp;quot;zam&amp;quot;); setlocale(LC_CTYPE,&amp;quot;UTF-8&amp;quot;);
&lt;br&gt;&lt;br&gt;All should do the job, using any info that is available and picking
&lt;br&gt;generic modern choices for the rest.
&lt;br&gt;&lt;br&gt;There just doesn't seem to be any reasonable way to kick gettext into
&lt;br&gt;UTF-8 mode and feed it a *.mo file. This should be more than easy; it
&lt;br&gt;should be what you tend to end up with when things aren't consistant.
&lt;br&gt;&lt;br&gt;I could see &amp;quot;C&amp;quot; being Latin-1 by default instead of UTF-8 (though wide
&lt;br&gt;character functions should still support full Unicode), and I could see
&lt;br&gt;having message lookup disabled if **nothing** non-C is enabled. Once I
&lt;br&gt;call bind_textdomain_codeset(&amp;quot;tuxpaint&amp;quot;,&amp;quot;UTF-8&amp;quot;) or setlocale(foo,&amp;quot;zam&amp;quot;)
&lt;br&gt;though, it should be obvious what gettext needs to do.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---Utils---Bugs-f1828.html&quot; embed=&quot;fixTarget[1828]&quot; target=&quot;_top&quot; &gt;Gnu - Utils - Bugs&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/supporting-obscure-languages-tp26538776p26549558.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26547353</id>
	<title>Re: The awk bug</title>
	<published>2009-11-27T12:21:32Z</published>
	<updated>2009-11-27T12:21:32Z</updated>
	<author>
		<name>John Cowan</name>
	</author>
	<content type="html">Kaplenko Vitaliy scripsit:
&lt;br&gt;&lt;br&gt;&amp;gt; $ echo &amp;quot;./some_script&amp;quot; | awk 'gsub(&amp;quot;.&amp;quot;,&amp;quot;a&amp;quot;) {print $0}'
&lt;br&gt;&amp;gt; aaaaaaaaaaaaa
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; But must be:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; $ echo &amp;quot;./some_script&amp;quot; | awk 'gsub(&amp;quot;.&amp;quot;,&amp;quot;a&amp;quot;) {print $0}'
&lt;br&gt;&amp;gt; a/some_script
&lt;br&gt;&lt;br&gt;Not so. &amp;nbsp;The first argument of gsub is interpreted as a regular
&lt;br&gt;expression, and &amp;quot;.&amp;quot; in a regular expression means &amp;quot;any character&amp;quot;.
&lt;br&gt;Consequently, all characters in the input are replaced. &amp;nbsp;You must use
&lt;br&gt;&amp;quot;\.&amp;quot; to match a literal dot.
&lt;br&gt;&lt;br&gt;&amp;gt; $ echo &amp;quot;some_script&amp;quot; | awk 'gsub(&amp;quot;/&amp;quot;,&amp;quot;a&amp;quot;) {print $0}'
&lt;br&gt;&amp;gt; $
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; But must be:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; $ echo &amp;quot;some_script&amp;quot; | awk 'gsub(&amp;quot;/&amp;quot;,&amp;quot;a&amp;quot;) {print $0}'
&lt;br&gt;&amp;gt; $ some_script
&lt;br&gt;&lt;br&gt;Also not the case. &amp;nbsp;You have placed the call to gsub into the pattern
&lt;br&gt;part of the pattern-action statement. &amp;nbsp;Consequently, it evaluates to 0
&lt;br&gt;because there are no slashes in the input, and therefore the action is
&lt;br&gt;never executed. &amp;nbsp;A correct action statement would be
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {gsub(&amp;quot;/&amp;quot;, a); print $0}
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;A rabbi whose congregation doesn't want &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; John Cowan
&lt;br&gt;to drive him out of town isn't a rabbi, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://www.ccil.org/~cowan&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.ccil.org/~cowan&lt;/a&gt;&lt;br&gt;and a rabbi who lets them do it &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26547353&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cowan@...&lt;/a&gt;
&lt;br&gt;isn't a man. &amp;nbsp; &amp;nbsp;--Jewish saying
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---Utils---Bugs-f1828.html&quot; embed=&quot;fixTarget[1828]&quot; target=&quot;_top&quot; &gt;Gnu - Utils - Bugs&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/The-awk-bug-tp26546846p26547353.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26546097</id>
	<title>Re: supporting obscure languages</title>
	<published>2009-11-27T10:17:20Z</published>
	<updated>2009-11-27T10:17:20Z</updated>
	<author>
		<name>John Cowan</name>
	</author>
	<content type="html">Bruno Haible scripsit:
&lt;br&gt;&lt;br&gt;&amp;gt; 1) You need to define a locale identifier for it. This is important,
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;because the users and all translators must agree on it - if a
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;translator uses a different identifier than the user, her
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;translations will not be found. The standardized identifiers
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;are those in ISO 639-1 and ISO 639-2, and also found in glibc's
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;glibc/locale/iso-639.def.
&lt;br&gt;&lt;br&gt;Is there any reason why ISO 639-3 identifiers cannot be used for
&lt;br&gt;appropriate languages? &amp;nbsp;639-3 is much more comprehensive than 639-2, and
&lt;br&gt;the identifiers correspond (that is, since 'haw' is Hawaiian in 639-2,
&lt;br&gt;it has the same meaning in 639-3).
&lt;br&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;If your language is a distinct one, you should find the language
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;identifier in this list. If your language is a dialect of another
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;language, you can use a variant tag. For example, if by &amp;quot;zam&amp;quot; you
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;mean the language &amp;quot;Zapotec, Miahuatlán&amp;quot;, it is a dialect of
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;Zapotec, which has the identifier &amp;quot;zap&amp;quot;. So you will likely
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;choose the language identifier &amp;quot;zap@miahuatlan&amp;quot; (all ASCII please).
&lt;br&gt;&lt;br&gt;&amp;quot;Zapotec&amp;quot; is what 639-3 calls a macrolanguage: that is, it is a collection
&lt;br&gt;of closely related languages that is for some purposes treated as a
&lt;br&gt;single language. &amp;nbsp;The Zapotec macrolanguage encompasses 58 languages.
&lt;br&gt;I emphasize that these are distinct languages, not at all mutually
&lt;br&gt;intelligible. &amp;nbsp;Calling them &amp;quot;dialects of Zapotec&amp;quot; is exactly like calling
&lt;br&gt;French, Spanish, and Italian &amp;quot;dialects of Latin&amp;quot;: it reflects an old
&lt;br&gt;unity that has long since been lost.
&lt;br&gt;&lt;br&gt;Furthermore, no one Zapotec language is either numerically or culturally
&lt;br&gt;dominant: Isthmus Zapotec (zai), the largest, has perhaps 85,000 speakers
&lt;br&gt;out of a total Zapotec-speaking population of 500,000. &amp;nbsp;This makes it
&lt;br&gt;quite different from better known macrolanguages such as Arabic (which
&lt;br&gt;encompasses about 30 languages, with Standard Arabic culturally but
&lt;br&gt;not numerically dominant) and Chinese (which encompasses 13 languages,
&lt;br&gt;with Mandarin both culturally and numerically dominant).
&lt;br&gt;&lt;br&gt;In short, unless there is some technical barrier to using 639-3 code
&lt;br&gt;elements, it is more appropriate to code this language as &amp;quot;zam&amp;quot; rather
&lt;br&gt;than as &amp;quot;zap@miahuatlan&amp;quot;.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;The Imperials are decadent, 300 pound &amp;nbsp; John Cowan &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26546097&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cowan@...&lt;/a&gt;&amp;gt;
&lt;br&gt;free-range chickens (except they have &amp;nbsp; &lt;a href=&quot;http://www.ccil.org/~cowan&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.ccil.org/~cowan&lt;/a&gt;&lt;br&gt;teeth, arms instead of wings, and
&lt;br&gt;dinosaurlike tails). &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;--Elyse Grasso
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---Utils---Bugs-f1828.html&quot; embed=&quot;fixTarget[1828]&quot; target=&quot;_top&quot; &gt;Gnu - Utils - Bugs&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/supporting-obscure-languages-tp26538776p26546097.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26546849</id>
	<title>The awk bug 2</title>
	<published>2009-11-27T08:50:01Z</published>
	<updated>2009-11-27T08:50:01Z</updated>
	<author>
		<name>Kaplenko Vitalij</name>
	</author>
	<content type="html">If run
&lt;br&gt;in Linux localhost.localdomain 2.6.29.5-191.fc11.i686.PAE #1 SMP Tue Jun 
&lt;br&gt;16 23:19:53 EDT 2009 i686 i686 i386 GNU/Linux:
&lt;br&gt;&lt;br&gt;$ echo &amp;quot;some_script&amp;quot; | awk 'gsub(&amp;quot;/&amp;quot;,&amp;quot;a&amp;quot;) {print $0}'
&lt;br&gt;$
&lt;br&gt;&lt;br&gt;But must be:
&lt;br&gt;&lt;br&gt;$ echo &amp;quot;some_script&amp;quot; | awk 'gsub(&amp;quot;/&amp;quot;,&amp;quot;a&amp;quot;) {print $0}'
&lt;br&gt;$ some_script
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---Utils---Bugs-f1828.html&quot; embed=&quot;fixTarget[1828]&quot; target=&quot;_top&quot; &gt;Gnu - Utils - Bugs&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/The-awk-bug-2-tp26546849p26546849.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26546846</id>
	<title>The awk bug</title>
	<published>2009-11-27T08:31:23Z</published>
	<updated>2009-11-27T08:31:23Z</updated>
	<author>
		<name>Kaplenko Vitalij</name>
	</author>
	<content type="html">If run
&lt;br&gt;in Linux localhost.localdomain 2.6.29.5-191.fc11.i686.PAE #1 SMP Tue Jun 
&lt;br&gt;16 23:19:53 EDT 2009 i686 i686 i386 GNU/Linux:
&lt;br&gt;&lt;br&gt;$ echo &amp;quot;./some_script&amp;quot; | awk 'gsub(&amp;quot;.&amp;quot;,&amp;quot;a&amp;quot;) {print $0}'
&lt;br&gt;aaaaaaaaaaaaa
&lt;br&gt;&lt;br&gt;But must be:
&lt;br&gt;&lt;br&gt;$ echo &amp;quot;./some_script&amp;quot; | awk 'gsub(&amp;quot;.&amp;quot;,&amp;quot;a&amp;quot;) {print $0}'
&lt;br&gt;a/some_script
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---Utils---Bugs-f1828.html&quot; embed=&quot;fixTarget[1828]&quot; target=&quot;_top&quot; &gt;Gnu - Utils - Bugs&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/The-awk-bug-tp26546846p26546846.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26542035</id>
	<title>Re: supporting obscure languages</title>
	<published>2009-11-27T04:42:38Z</published>
	<updated>2009-11-27T04:42:38Z</updated>
	<author>
		<name>Bruno Haible</name>
	</author>
	<content type="html">Hi Albert,
&lt;br&gt;&lt;br&gt;You did not state what you are trying to do. I understand it like this:
&lt;br&gt;&amp;quot;How do I add support for a specific, rarely used language to my system
&lt;br&gt;&amp;nbsp;in such a way that I can localize programs for this language?&amp;quot;
&lt;br&gt;&lt;br&gt;The answer is:
&lt;br&gt;&lt;br&gt;1) You need to define a locale identifier for it. This is important,
&lt;br&gt;&amp;nbsp; &amp;nbsp;because the users and all translators must agree on it - if a
&lt;br&gt;&amp;nbsp; &amp;nbsp;translator uses a different identifier than the user, her
&lt;br&gt;&amp;nbsp; &amp;nbsp;translations will not be found. The standardized identifiers
&lt;br&gt;&amp;nbsp; &amp;nbsp;are those in ISO 639-1 and ISO 639-2, and also found in glibc's
&lt;br&gt;&amp;nbsp; &amp;nbsp;glibc/locale/iso-639.def.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;If your language is a distinct one, you should find the language
&lt;br&gt;&amp;nbsp; &amp;nbsp;identifier in this list. If your language is a dialect of another
&lt;br&gt;&amp;nbsp; &amp;nbsp;language, you can use a variant tag. For example, if by &amp;quot;zam&amp;quot; you
&lt;br&gt;&amp;nbsp; &amp;nbsp;mean the language &amp;quot;Zapotec, Miahuatlán&amp;quot;, it is a dialect of
&lt;br&gt;&amp;nbsp; &amp;nbsp;Zapotec, which has the identifier &amp;quot;zap&amp;quot;. So you will likely
&lt;br&gt;&amp;nbsp; &amp;nbsp;choose the language identifier &amp;quot;zap@miahuatlan&amp;quot; (all ASCII please).
&lt;br&gt;&lt;br&gt;2) You may need to define a glibc locale. This is necessary for a
&lt;br&gt;&amp;nbsp; &amp;nbsp;distinct language and optional for a variant (need it only if you
&lt;br&gt;&amp;nbsp; &amp;nbsp;want to override some localizations). You need it because things
&lt;br&gt;&amp;nbsp; &amp;nbsp;like month name, time display rules and the like are not defined
&lt;br&gt;&amp;nbsp; &amp;nbsp;by .po files but through a locale definition. To create a locale, use the
&lt;br&gt;&amp;nbsp; &amp;nbsp;&amp;quot;localedef&amp;quot; command together with a locale definition file. There
&lt;br&gt;&amp;nbsp; &amp;nbsp;are dozens of examples of these locale definition files in a
&lt;br&gt;&amp;nbsp; &amp;nbsp;directory mentioned in the output of &amp;quot;localedef --help&amp;quot;.
&lt;br&gt;&lt;br&gt;3) Then you can create .mo files from .po files for that language,
&lt;br&gt;&amp;nbsp; &amp;nbsp;as described in the GNU gettext documentation.
&lt;br&gt;&lt;br&gt;Albert Cahalan wrote:
&lt;br&gt;&amp;gt; Given a fairly normal program, how can the user force the use of a
&lt;br&gt;&amp;gt; specific known messages file? Consider /tmp/testfile.mo in a locale
&lt;br&gt;&amp;gt; that isn't otherwise defined in any way.
&lt;br&gt;&lt;br&gt;You can set the environment variable LOCALEDIR to, say, /tmp/locale,
&lt;br&gt;and then store the file as /tmp/locale/$localeID/LC_MESSAGES/testfile.mo.
&lt;br&gt;&lt;br&gt;&amp;gt; Now suppose that the file is stored in the expected place. The user
&lt;br&gt;&amp;gt; wants to use /usr/share/locale/zam/LC_MESSAGES/someprog.mo with a
&lt;br&gt;&amp;gt; program that claims to be someprog. Again, the locale isn't supported
&lt;br&gt;&amp;gt; in any other way; there is merely a *.mo file installed.
&lt;br&gt;&lt;br&gt;This is only supported in the dialect case. If you choose the
&lt;br&gt;language identifier &amp;quot;zap@miahuatlan&amp;quot; and the user's locale identifier
&lt;br&gt;is zap_MX.UTF-8@miahuatlan, you need only a zap_MX.UTF-8 locale; a
&lt;br&gt;zap_MX.UTF-8@miahuatlan locale does not need to exist.
&lt;br&gt;&lt;br&gt;&amp;gt; How can a program offer a non-environment way to override the source
&lt;br&gt;&amp;gt; of messages? The obvious setlocale(LC_ALL,&amp;quot;zam&amp;quot;) does not work, nor
&lt;br&gt;&amp;gt; does the troublesome (because other locales need more) substitution
&lt;br&gt;&amp;gt; of setlocale(LC_MESSAGES,&amp;quot;zam&amp;quot;).
&lt;br&gt;&lt;br&gt;There is setlocale, and there is bindtextdomain. But you should have a
&lt;br&gt;locale first.
&lt;br&gt;&lt;br&gt;&amp;gt; BTW, please consider it a bug that that doesn't just work.
&lt;br&gt;&lt;br&gt;No, not a bug. This is the way locales are designed.
&lt;br&gt;&lt;br&gt;Bruno
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---Utils---Bugs-f1828.html&quot; embed=&quot;fixTarget[1828]&quot; target=&quot;_top&quot; &gt;Gnu - Utils - Bugs&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/supporting-obscure-languages-tp26538776p26542035.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26538776</id>
	<title>supporting obscure languages</title>
	<published>2009-11-26T10:28:50Z</published>
	<updated>2009-11-26T10:28:50Z</updated>
	<author>
		<name>Albert Cahalan</name>
	</author>
	<content type="html">First, you may assume that the locale is UTF-8. We only care about
&lt;br&gt;the messages and getting stuff like iswprint or towupper to work in
&lt;br&gt;the default (no Turkish i, etc.) Unicode way.
&lt;br&gt;&lt;br&gt;Given a fairly normal program, how can the user force the use of a
&lt;br&gt;specific known messages file? Consider /tmp/testfile.mo in a locale
&lt;br&gt;that isn't otherwise defined in any way.
&lt;br&gt;&lt;br&gt;Now suppose that the file is stored in the expected place. The user
&lt;br&gt;wants to use /usr/share/locale/zam/LC_MESSAGES/someprog.mo with a
&lt;br&gt;program that claims to be someprog. Again, the locale isn't supported
&lt;br&gt;in any other way; there is merely a *.mo file installed. Without
&lt;br&gt;giving the full path, and with minimal complexity, how can the user
&lt;br&gt;get this file to be used?
&lt;br&gt;&lt;br&gt;How can a program offer a non-environment way to override the source
&lt;br&gt;of messages? The obvious setlocale(LC_ALL,&amp;quot;zam&amp;quot;) does not work, nor
&lt;br&gt;does the troublesome (because other locales need more) substitution
&lt;br&gt;of setlocale(LC_MESSAGES,&amp;quot;zam&amp;quot;).
&lt;br&gt;&lt;br&gt;BTW, please consider it a bug that that doesn't just work.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---Utils---Bugs-f1828.html&quot; embed=&quot;fixTarget[1828]&quot; target=&quot;_top&quot; &gt;Gnu - Utils - Bugs&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/supporting-obscure-languages-tp26538776p26538776.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26508979</id>
	<title>Re: wint_t in cross building, gnulib failing build.</title>
	<published>2009-11-25T00:23:54Z</published>
	<updated>2009-11-25T00:23:54Z</updated>
	<author>
		<name>Lluís Batlle</name>
	</author>
	<content type="html">Hello,
&lt;br&gt;&lt;br&gt;thank you very much for your answer.
&lt;br&gt;&lt;br&gt;2009/11/25 Bruno Haible &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26508979&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;bruno@...&lt;/a&gt;&amp;gt;:
&lt;br&gt;&amp;gt; You might therefore want to try the newest gettext from git, combined
&lt;br&gt;&amp;gt; with the newest gnulib from git. Be sure to look at the gettext/HACKING file.
&lt;br&gt;&lt;br&gt;I think I will wait for the next release, because by now I have a
&lt;br&gt;solution to get all working. I only wanted to understand a bit the
&lt;br&gt;logic behind the 'configure' decisions I was seeing, in order to learn
&lt;br&gt;from something I was not understanding.
&lt;br&gt;But now I'm happy that I was understanding, and there are fixes in
&lt;br&gt;newer versions of the code.
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;Lluís.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---Utils---Bugs-f1828.html&quot; embed=&quot;fixTarget[1828]&quot; target=&quot;_top&quot; &gt;Gnu - Utils - Bugs&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/wint_t-in-cross-building%2C-gnulib-failing-build.-tp26487896p26508979.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26504946</id>
	<title>Re: wint_t in cross building, gnulib failing build.</title>
	<published>2009-11-24T15:08:15Z</published>
	<updated>2009-11-24T15:08:15Z</updated>
	<author>
		<name>Bruno Haible</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;Lluís Batlle wrote:
&lt;br&gt;&amp;gt; I'm trying to cross-build gettext, and with my toolchain (gcc 4.3.4
&lt;br&gt;&amp;gt; and glibc-2.9 for armv5tel-linux) I have problems, while I don't have
&lt;br&gt;&amp;gt; any problem building it not natively.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I found that the gettext-runtime configure has a check like this:
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if test &amp;quot;$cross_compiling&amp;quot; = yes; then
&lt;br&gt;&amp;gt; &amp;nbsp; gl_cv_func_wcwidth_works=&amp;quot;guessing no&amp;quot;
&lt;br&gt;&lt;br&gt;This has been improved in gnulib on 2009-07-14: it will now guess &amp;quot;yes&amp;quot;
&lt;br&gt;on glibc systems and &amp;quot;no&amp;quot; elsewhere.
&lt;br&gt;&lt;br&gt;&amp;gt; In native builds (where I use the same compiler and glibc version) I
&lt;br&gt;&amp;gt; have gl_cv_func_wcwidth_works=yes, and having this defined as 'no'
&lt;br&gt;&amp;gt; results in gettext-runtime/gnulib-lib/ use its own 'wchar.h' created
&lt;br&gt;&amp;gt; from 'wchar.h.in'
&lt;br&gt;&lt;br&gt;This should be redundant but harmless.
&lt;br&gt;&lt;br&gt;&amp;gt; and this wchar.h ends up not having wint_t defined 
&lt;br&gt;&amp;gt; as required in glibc's wchar.h, included through mbchar.h in
&lt;br&gt;&amp;gt; gnulib-lib.
&lt;br&gt;&lt;br&gt;This has been fixed in gnulib on 2009-01-15 and 2009-01-17.
&lt;br&gt;&lt;br&gt;You might therefore want to try the newest gettext from git, combined
&lt;br&gt;with the newest gnulib from git. Be sure to look at the gettext/HACKING file.
&lt;br&gt;&lt;br&gt;&amp;gt; I'm going to go on using a cache-file, and setting
&lt;br&gt;&amp;gt; gl_cv_func_wcwidth_works=yes there
&lt;br&gt;&lt;br&gt;Yes, this should work. You can also pass gl_cv_func_wcwidth_works=yes as
&lt;br&gt;an environment variable setting while running configure.
&lt;br&gt;&lt;br&gt;&amp;gt; but I would like to know why this 
&lt;br&gt;&amp;gt; mbchar build fails for me having no wint_t type defined. Why
&lt;br&gt;&amp;gt; cross-compiling the wcwidth function would not work?
&lt;br&gt;&lt;br&gt;Simply, it had not been tested before the release of gettext 0.17.
&lt;br&gt;&lt;br&gt;Bruno
&lt;br&gt;&lt;br&gt;[1] &lt;a href=&quot;https://savannah.gnu.org/git/?group=gettext&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://savannah.gnu.org/git/?group=gettext&lt;/a&gt;&lt;br&gt;[2] &lt;a href=&quot;https://savannah.gnu.org/git/?group=gnulib&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://savannah.gnu.org/git/?group=gnulib&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---Utils---Bugs-f1828.html&quot; embed=&quot;fixTarget[1828]&quot; target=&quot;_top&quot; &gt;Gnu - Utils - Bugs&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/wint_t-in-cross-building%2C-gnulib-failing-build.-tp26487896p26504946.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26487896</id>
	<title>wint_t in cross building, gnulib failing build.</title>
	<published>2009-11-23T10:35:15Z</published>
	<updated>2009-11-23T10:35:15Z</updated>
	<author>
		<name>Lluís Batlle</name>
	</author>
	<content type="html">Hello,
&lt;br&gt;&lt;br&gt;I'm trying to cross-build gettext, and with my toolchain (gcc 4.3.4
&lt;br&gt;and glibc-2.9 for armv5tel-linux) I have problems, while I don't have
&lt;br&gt;any problem building it not natively.
&lt;br&gt;&lt;br&gt;I found that the gettext-runtime configure has a check like this:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if test &amp;quot;$cross_compiling&amp;quot; = yes; then
&lt;br&gt;&amp;nbsp; gl_cv_func_wcwidth_works=&amp;quot;guessing no&amp;quot;
&lt;br&gt;&lt;br&gt;In native builds (where I use the same compiler and glibc version) I
&lt;br&gt;have gl_cv_func_wcwidth_works=yes, and having this defined as 'no'
&lt;br&gt;results in gettext-runtime/gnulib-lib/ use its own 'wchar.h' created
&lt;br&gt;from 'wchar.h.in', and this wchar.h ends up not having wint_t defined
&lt;br&gt;as required in glibc's wchar.h, included through mbchar.h in
&lt;br&gt;gnulib-lib.
&lt;br&gt;&lt;br&gt;I'm going to go on using a cache-file, and setting
&lt;br&gt;gl_cv_func_wcwidth_works=yes there, but I would like to know why this
&lt;br&gt;mbchar build fails for me having no wint_t type defined. Why
&lt;br&gt;cross-compiling the wcwidth function would not work?
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;Lluís.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---Utils---Bugs-f1828.html&quot; embed=&quot;fixTarget[1828]&quot; target=&quot;_top&quot; &gt;Gnu - Utils - Bugs&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/wint_t-in-cross-building%2C-gnulib-failing-build.-tp26487896p26487896.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26467516</id>
	<title>XMLgawk for Windows</title>
	<published>2009-11-22T08:37:28Z</published>
	<updated>2009-11-22T08:37:28Z</updated>
	<author>
		<name>Wim van Blitterswijk-2</name>
	</author>
	<content type="html">&lt;br&gt;&amp;nbsp; &amp;nbsp;Hello developers,
&lt;br&gt;&amp;nbsp; &amp;nbsp;As mentioned in my mail of 5 November, I managed to build XMLgawk for native
&lt;br&gt;&amp;nbsp; &amp;nbsp;Windows :-) .
&lt;br&gt;&amp;nbsp; &amp;nbsp;In the previous version, however, I forgot the dependency on libiconv-2.dll.
&lt;br&gt;&amp;nbsp; &amp;nbsp;(The dll was already on the path in my environment, so it worked in my
&lt;br&gt;&amp;nbsp; &amp;nbsp;case.) The file is now included in the archive that can be downloaded from
&lt;br&gt;&amp;nbsp; &amp;nbsp;my site:
&lt;br&gt;&amp;nbsp; &amp;nbsp;[1]&lt;a href=&quot;http://www.wimdows.info/project/xmlgawk&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.wimdows.info/project/xmlgawk&lt;/a&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;To use the new gawk.exe, with xml support:
&lt;br&gt;&amp;nbsp; &amp;nbsp;- The dynamic library xml.dll needs to be on your AWKLIBPATH or in the
&lt;br&gt;&amp;nbsp; &amp;nbsp;current working directory,
&lt;br&gt;&amp;nbsp; &amp;nbsp;- The dll's libexpat-1.dll and libiconv-2.dll (and gawk.exe) need to be on
&lt;br&gt;&amp;nbsp; &amp;nbsp;your path.
&lt;br&gt;&amp;nbsp; &amp;nbsp;Hope you will be able to use the binaries now.
&lt;br&gt;&amp;nbsp; &amp;nbsp;Regards,
&lt;br&gt;&amp;nbsp; &amp;nbsp;Wim van Blitterswijk
&lt;br&gt;&amp;nbsp; &amp;nbsp;Wim van Blitterswijk wrote:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Hello developers,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;After some hard work I seem to be able to build XMLgawk for native Windows
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;:-)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;JÃ¼rgen, Victor and Manuel: thanks for all the tips!
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;If you're interested, have a look at
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;[2]&lt;a href=&quot;http://www.wimdows.info/project/xmlgawk&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.wimdows.info/project/xmlgawk&lt;/a&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;and have fun.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Regards,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Wim van Blitterswijk
&lt;br&gt;&lt;br&gt;References
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;1. &lt;a href=&quot;http://www.wimdows.info/project/xmlgawk&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.wimdows.info/project/xmlgawk&lt;/a&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;2. &lt;a href=&quot;http://www.wimdows.info/project/xmlgawk&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.wimdows.info/project/xmlgawk&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---Utils---Bugs-f1828.html&quot; embed=&quot;fixTarget[1828]&quot; target=&quot;_top&quot; &gt;Gnu - Utils - Bugs&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/XMLgawk-in-Windows-tp26226517p26467516.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26458906</id>
	<title>GNU gettest manual</title>
	<published>2009-11-21T04:06:11Z</published>
	<updated>2009-11-21T04:06:11Z</updated>
	<author>
		<name>Bugzilla from publi@web.de</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;I have got a version of the preliminary draft GNU gettext documenation on my 
&lt;br&gt;computer with poedit. It says:
&lt;br&gt;&lt;br&gt;Edition 0.10.35, 1 May 1998
&lt;br&gt;&lt;br&gt;That is 10 years old, wouw.
&lt;br&gt;&lt;br&gt;It publishes an outdated e-mai address which should be updated:
&lt;br&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26458906&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;bug-gnu-utils@...&lt;/a&gt;&amp;gt;: host mx10.gnu.org[199.232.76.166] said: 550
&lt;br&gt;*.ai.mit.edu no longer in use. use @gnu.org instead. (in reply to RCPT TO
&lt;br&gt;command)
&lt;br&gt;&lt;br&gt;Few remarks:
&lt;br&gt;&lt;br&gt;&amp;nbsp;In &amp;quot;Aspects in Native Language Support&amp;quot; it talks of countries a lot. This is 
&lt;br&gt;misguiding, and too imprecise. &amp;quot;Cultures or Regions&amp;quot; would be the better 
&lt;br&gt;term. Beware: Many major languages like Chinese, English, Spanish, 
&lt;br&gt;Arabic,Bengali, Portuguese, Swahili German, Kurdi, Azeri, Dutch are spoken in 
&lt;br&gt;several or even many countries and continents. Some languages are spoken only 
&lt;br&gt;in federal states, provinces, regions, vallies, islands, cities, or even 
&lt;br&gt;villages inside a country. Many countries have many languages, such as India 
&lt;br&gt;(260+), Philipines (~80), South Africa, and so on. Some areas are having 
&lt;br&gt;mixed languages, for instance East Belgium has French, Wallon, German, and 
&lt;br&gt;vernacular, and very many people are fluent using either. While i18n may use 
&lt;br&gt;an open set lof languages, L18n has a complicated set of mixes and 
&lt;br&gt;dependencies on language, culture, and the like.
&lt;br&gt;&lt;br&gt;&amp;nbsp;One thing hardly taken care of is that peoples multilinguality varies. 
&lt;br&gt;Setting a computer to use, say, russian, is by far insufficient. In fact, one 
&lt;br&gt;would need to tell on a per user basis, which language / locale to use, and a 
&lt;br&gt;series of fallbacks, to be used in such cases, where all more perferred L18ns 
&lt;br&gt;are unavaliable, This thinking needs to be reflected in each program, or at 
&lt;br&gt;least the libraries it is using. All GUI program should allow interactive and 
&lt;br&gt;instant switching between languages and locales, so as to aid people who are 
&lt;br&gt;not sure to have understood something right in one language or with one 
&lt;br&gt;locale, and to support changing users at the screen without having to reboot.
&lt;br&gt;&lt;br&gt;&amp;nbsp;It is fairly insufficient, only to translate strings. Parameter insertion is 
&lt;br&gt;needed, parameter typing is needed, case switching is needed (for instance on 
&lt;br&gt;various &amp;nbsp;grammatical forms, numbers, genders, addressing modes and 
&lt;br&gt;politeness, to name only a few) and programs, programmers, screen designers 
&lt;br&gt;and layouters need to be aware of the flexibility required by the outcomes.
&lt;br&gt;&lt;br&gt;Hints:
&lt;br&gt;&lt;a href=&quot;http://www.mediawiki.org/wiki/I18n&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.mediawiki.org/wiki/I18n&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://cldr.unicode.org/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://cldr.unicode.org/&lt;/a&gt;&lt;br&gt;&lt;br&gt;Greetings - Purodha Blissenbach, &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26458906&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;publi@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---Utils---Bugs-f1828.html&quot; embed=&quot;fixTarget[1828]&quot; target=&quot;_top&quot; &gt;Gnu - Utils - Bugs&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/GNU-gettest-manual-tp26458906p26458906.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26403027</id>
	<title>gettext 0.17 doesn't build on mingw</title>
	<published>2009-11-17T15:55:56Z</published>
	<updated>2009-11-17T15:55:56Z</updated>
	<author>
		<name>Rainer Emrich-2</name>
	</author>
	<content type="html">-----BEGIN PGP SIGNED MESSAGE-----
&lt;br&gt;Hash: SHA1
&lt;br&gt;&lt;br&gt;gettext 0.17 doesn't build on mingw, because mingw's _mkdir() function has 1
&lt;br&gt;argument and gettext is passing 2 arguments.
&lt;br&gt;Possible solution would be to pull in the gnulib mkdir, no?
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;Rainer
&lt;br&gt;-----BEGIN PGP SIGNATURE-----
&lt;br&gt;Version: GnuPG v1.4.10 (MingW32)
&lt;br&gt;Comment: Using GnuPG with Mozilla - &lt;a href=&quot;http://enigmail.mozdev.org/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://enigmail.mozdev.org/&lt;/a&gt;&lt;br&gt;&lt;br&gt;iEYEARECAAYFAksDOAwACgkQoUhjsh59BL6pPQCfXdTeDWoKzH0MfvJmlk9YFqkw
&lt;br&gt;woAAn2kDFmlGL8IAZiXx3qV/VJQnkBbb
&lt;br&gt;=fy7l
&lt;br&gt;-----END PGP SIGNATURE-----
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---Utils---Bugs-f1828.html&quot; embed=&quot;fixTarget[1828]&quot; target=&quot;_top&quot; &gt;Gnu - Utils - Bugs&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/gettext-0.17-doesn%27t-build-on-mingw-tp26403027p26403027.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26389619</id>
	<title>Re: GNU make: multiple patterns for prerequisites</title>
	<published>2009-11-17T03:46:28Z</published>
	<updated>2009-11-17T03:46:28Z</updated>
	<author>
		<name>bocadillodeatun@gmail.com</name>
	</author>
	<content type="html">Ok. Thanks.
&lt;br&gt;&lt;br&gt;I guess it's not that bad after all :)
&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---Utils---Help-f1829.html&quot; embed=&quot;fixTarget[1829]&quot; target=&quot;_top&quot; &gt;Gnu - Utils - Help&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/GNU-make%3A-multiple-patterns-for-prerequisites-tp26379692p26389619.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26385535</id>
	<title>Re: Small typo in diffutils Spanish translation</title>
	<published>2009-11-16T23:30:29Z</published>
	<updated>2009-11-16T23:30:29Z</updated>
	<author>
		<name>Jim Meyering</name>
	</author>
	<content type="html">Germán Bassi wrote:
&lt;br&gt;&amp;gt; I've spotted a small typo in the Spanish translation of diff and here
&lt;br&gt;&amp;gt; is a patch to fix it.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; There's a debian bug report [1] about it but they told me to contact you.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thank you,
&lt;br&gt;&amp;gt; Germán Bassi.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; [1] &lt;a href=&quot;http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=481708&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=481708&lt;/a&gt;&lt;br&gt;&lt;br&gt;Thanks for persevering. &amp;nbsp;You're almost done ;-)
&lt;br&gt;&lt;br&gt;Actually, we pull translations automatically from the
&lt;br&gt;translationproject.org, so the Spanish translators there:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &lt;a href=&quot;http://translationproject.org/team/es.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://translationproject.org/team/es.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;Here's the team address:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26385535&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;es@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---Utils---Bugs-f1828.html&quot; embed=&quot;fixTarget[1828]&quot; target=&quot;_top&quot; &gt;Gnu - Utils - Bugs&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Small-typo-in-diffutils-Spanish-translation-tp26379654p26385535.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26381065</id>
	<title>Re: GNU make: multiple patterns for prerequisites</title>
	<published>2009-11-16T14:01:10Z</published>
	<updated>2009-11-16T14:01:10Z</updated>
	<author>
		<name>Henrik Carlqvist-4</name>
	</author>
	<content type="html">bocadillodeatun &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26381065&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;bocadillodeatun@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; I have somethign like this:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; one.o two.o : %.o :%.c
&lt;br&gt;&lt;br&gt;&amp;gt; However, some of my source files can be either &amp;quot;.c&amp;quot; or &amp;quot;.S&amp;quot;.
&lt;br&gt;&amp;gt; So... is there any way to tell &amp;quot;make&amp;quot; to look in VPATH for files that
&lt;br&gt;&amp;gt; match either one or another ?
&lt;br&gt;&lt;br&gt;Yes, use two rules:
&lt;br&gt;&lt;br&gt;one.o two.o : %.o :%.c
&lt;br&gt;&lt;br&gt;one.o two.o : %.o :%.S
&lt;br&gt;&lt;br&gt;&amp;gt; I know I could first &amp;quot;filter&amp;quot; my files in two groups, and then create
&lt;br&gt;&amp;gt; two rules... I was just wondering if this feature can be accessed
&lt;br&gt;&amp;gt; by a single rule.
&lt;br&gt;&lt;br&gt;AFAIK it is not possible with only one rule.
&lt;br&gt;&lt;br&gt;regards Henrik
&lt;br&gt;-- 
&lt;br&gt;The address in the header is only to prevent spam. My real address is:
&lt;br&gt;hc3(at)poolhem.se Examples of addresses which go to spammers:
&lt;br&gt;root@localhost postmaster@localhost
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---Utils---Help-f1829.html&quot; embed=&quot;fixTarget[1829]&quot; target=&quot;_top&quot; &gt;Gnu - Utils - Help&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/GNU-make%3A-multiple-patterns-for-prerequisites-tp26379692p26381065.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26379654</id>
	<title>Small typo in diffutils Spanish translation</title>
	<published>2009-11-16T10:11:35Z</published>
	<updated>2009-11-16T10:11:35Z</updated>
	<author>
		<name>Germán Bassi</name>
	</author>
	<content type="html">Hello,
&lt;br&gt;&lt;br&gt;I've spotted a small typo in the Spanish translation of diff and here
&lt;br&gt;is a patch to fix it.
&lt;br&gt;&lt;br&gt;There's a debian bug report [1] about it but they told me to contact you.
&lt;br&gt;&lt;br&gt;Thank you,
&lt;br&gt;Germán Bassi.
&lt;br&gt;&lt;br&gt;[1] &lt;a href=&quot;http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=481708&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=481708&lt;/a&gt;&lt;br&gt;&lt;br /&gt;&lt;tt&gt;[diff_es_po.patch]&lt;/tt&gt;&lt;br /&gt;&lt;hr align=&quot;left&quot; width=&quot;300&quot; /&gt;&lt;tt&gt;--- es.old.po	2008-05-18 00:57:44.000000000 -0300
&lt;br&gt;+++ es.po	2008-05-18 01:07:27.000000000 -0300
&lt;br&gt;@@ -830,7 +830,7 @@
&lt;br&gt;&amp;nbsp;#: src/diff.c:1345
&lt;br&gt;&amp;nbsp;#, c-format
&lt;br&gt;&amp;nbsp;msgid &amp;quot;Files %s and %s are identical\n&amp;quot;
&lt;br&gt;-msgstr &amp;quot;Los ficheros %s y %s con idénticos\n&amp;quot;
&lt;br&gt;+msgstr &amp;quot;Los ficheros %s y %s son idénticos\n&amp;quot;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;#: src/diff3.c:26
&lt;br&gt;&amp;nbsp;msgid &amp;quot;Written by Randy Smith.&amp;quot;
&lt;br&gt;&lt;/tt&gt;&lt;hr align=&quot;left&quot; width=&quot;300&quot; /&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---Utils---Bugs-f1828.html&quot; embed=&quot;fixTarget[1828]&quot; target=&quot;_top&quot; &gt;Gnu - Utils - Bugs&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Small-typo-in-diffutils-Spanish-translation-tp26379654p26379654.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26379692</id>
	<title>GNU make: multiple patterns for prerequisites</title>
	<published>2009-11-16T09:25:18Z</published>
	<updated>2009-11-16T09:25:18Z</updated>
	<author>
		<name>bocadillodeatun@gmail.com</name>
	</author>
	<content type="html">Hi.
&lt;br&gt;&lt;br&gt;I could not find how to do this on the manual, so any help would be
&lt;br&gt;appreciated.
&lt;br&gt;&lt;br&gt;Given a VPATH variable, if I have somethign like this:
&lt;br&gt;&lt;br&gt;&amp;nbsp; one.o two.o : %.o :%.c
&lt;br&gt;&lt;br&gt;...&amp;quot;make&amp;quot; will search in the VPATH folders for files named &amp;quot;one.c&amp;quot; and
&lt;br&gt;&amp;quot;two.c&amp;quot; and
&lt;br&gt;compile them.
&lt;br&gt;&lt;br&gt;However, some of my source files can be either &amp;quot;.c&amp;quot; or &amp;quot;.S&amp;quot;.
&lt;br&gt;&lt;br&gt;So... is there any way to tell &amp;quot;make&amp;quot; to look in VPATH for files that
&lt;br&gt;match either
&lt;br&gt;one or another ?
&lt;br&gt;&lt;br&gt;Options:
&lt;br&gt;&lt;br&gt;1) one.o two.o : %.o : %.c %.s
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; Won't works because &amp;quot;make&amp;quot; will look for &amp;quot;one.c&amp;quot; AND &amp;quot;one.S&amp;quot;,
&lt;br&gt;&amp;nbsp; &amp;nbsp; and only one of them exists.
&lt;br&gt;&lt;br&gt;2) one.o two.o : %.o : %.{c,S}
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; Looks good, but &amp;quot;make&amp;quot; won't accept it :)
&lt;br&gt;&lt;br&gt;&lt;br&gt;I know I could first &amp;quot;filter&amp;quot; my files in two groups, and then create
&lt;br&gt;two rules... I was just wondering if this feature can be accessed
&lt;br&gt;by a single rule.
&lt;br&gt;&lt;br&gt;Thanks.
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---Utils---Help-f1829.html&quot; embed=&quot;fixTarget[1829]&quot; target=&quot;_top&quot; &gt;Gnu - Utils - Help&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/GNU-make%3A-multiple-patterns-for-prerequisites-tp26379692p26379692.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26371579</id>
	<title>Re: Bug with `-w' (`--ignore-all-space') option</title>
	<published>2009-11-16T05:06:32Z</published>
	<updated>2009-11-16T05:06:32Z</updated>
	<author>
		<name>Jim Meyering</name>
	</author>
	<content type="html">Andreas Schwab wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Khalukhin Alexander &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26371579&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;khalukhin@...&lt;/a&gt;&amp;gt; writes:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Here are two simple text files:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; [bugman@localhost 1]$ cat test1.txt
&lt;br&gt;&amp;gt;&amp;gt; a a a a
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; [bugman@localhost 1]$ cat test2.txt
&lt;br&gt;&amp;gt;&amp;gt; a
&lt;br&gt;&amp;gt;&amp;gt; a
&lt;br&gt;&amp;gt;&amp;gt; a
&lt;br&gt;&amp;gt;&amp;gt; a
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Now I'm trying to find difference, using -w (or --ignore-all-space) option:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; [bugman@localhost 1]$ diff -w test1.txt test2.txt
&lt;br&gt;&amp;gt;&amp;gt; 1c1,4
&lt;br&gt;&amp;gt;&amp;gt; &amp;lt; a a a a
&lt;br&gt;&amp;gt;&amp;gt; ---
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; a
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; a
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; a
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; a
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; But judging to MANs they should have no differences:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; diff always operates on lines, which separated by newlines that are not
&lt;br&gt;&amp;gt; considered part of them.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://www.gnu.org/software/diffutils/manual/html_node/diff-Options.html#diff%20Options&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.gnu.org/software/diffutils/manual/html_node/diff-Options.html#diff%20Options&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; -w --ignore-all-space Ignore white space when comparing lines. See White
&lt;br&gt;&amp;gt;&amp;gt; Space&amp;lt;&lt;a href=&quot;http://www.gnu.org/software/diffutils/manual/html_node/White-Space.html#White%20Space&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.gnu.org/software/diffutils/manual/html_node/White-Space.html#White%20Space&lt;/a&gt;&amp;gt;.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://www.gnu.org/software/diffutils/manual/html_node/White-Space.html#White%20Space&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.gnu.org/software/diffutils/manual/html_node/White-Space.html#White%20Space&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; The -w and --ignore-all-space options are stronger still. They ignore
&lt;br&gt;&amp;gt;&amp;gt; difference even if one line has white space where the other line has
&lt;br&gt;&amp;gt;&amp;gt; none. White
&lt;br&gt;&amp;gt;&amp;gt; space characters include tab, *newline*, vertical tab, form feed, carriage
&lt;br&gt;&amp;gt;&amp;gt; return, and space; some locales may define additional characters to be white
&lt;br&gt;&amp;gt;&amp;gt; space.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Is it a BUG?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; It's a documentation bug.
&lt;/div&gt;&lt;br&gt;Thanks for the report.
&lt;br&gt;FYI, that has been fixed for a while, and will
&lt;br&gt;be updated with the next release, which will be soon.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---Utils---Bugs-f1828.html&quot; embed=&quot;fixTarget[1828]&quot; target=&quot;_top&quot; &gt;Gnu - Utils - Bugs&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Bug-with-%60-w%27-%28%60--ignore-all-space%27%29-option-tp26319792p26371579.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26371535</id>
	<title>Re: diffutils now uses git</title>
	<published>2009-11-16T05:03:46Z</published>
	<updated>2009-11-16T05:03:46Z</updated>
	<author>
		<name>Jim Meyering</name>
	</author>
	<content type="html">Eric Blake wrote:
&lt;br&gt;&amp;gt; Jim Meyering &amp;lt;jim &amp;lt;at&amp;gt; meyering.net&amp;gt; writes:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://git.savannah.gnu.org/cgit/diffutils.git/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://git.savannah.gnu.org/cgit/diffutils.git/&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks!
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; However, you need this patch before diffutils is usable on all platforms,
&lt;br&gt;&amp;gt; because I got this link error when building on cygwin:
&lt;br&gt;...
&lt;br&gt;&amp;gt; Subject: [PATCH] build: avoid link failure when libsigsegv is used
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; * src/Makefile.am (LDADD): Link against LIBCSTACK.
&lt;br&gt;&lt;br&gt;Thanks. &amp;nbsp;It is now in my queue.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---Utils---Bugs-f1828.html&quot; embed=&quot;fixTarget[1828]&quot; target=&quot;_top&quot; &gt;Gnu - Utils - Bugs&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/diffutils-now-uses-git-tp26315147p26371535.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26367074</id>
	<title>Bug Report: gettext 0.17 can't extract both branches of a conditional expression for translation.</title>
	<published>2009-11-15T18:38:44Z</published>
	<updated>2009-11-15T18:38:44Z</updated>
	<author>
		<name>Shujing Zhao</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;When gettext 0.17 extract the following .c code for translation at 
&lt;br&gt;Linux, it can only extract the first branch.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; error (funcdef_flag
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;? &amp;quot;%qs defined in a non-class scope&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: &amp;quot;%qs declared in a non-class scope&amp;quot;, name);
&lt;br&gt;&lt;br&gt;&lt;br&gt;But an old version gettext 0.14.6 can extract both branches. I think it 
&lt;br&gt;is a bug of 0.17.
&lt;br&gt;&lt;br&gt;Thanks
&lt;br&gt;Pearly
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---Utils---Bugs-f1828.html&quot; embed=&quot;fixTarget[1828]&quot; target=&quot;_top&quot; &gt;Gnu - Utils - Bugs&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Bug-Report%3A-gettext-0.17-can%27t-extract-both-branches-of-a-conditional-expression-for-translation.-tp26367074p26367074.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26362833</id>
	<title>Running xgettext on diff/patch files</title>
	<published>2009-11-15T12:16:04Z</published>
	<updated>2009-11-15T12:16:04Z</updated>
	<author>
		<name>Cristian Rigamonti</name>
	</author>
	<content type="html">Hi, I'd like to run xgettext on some patches containing PHP code, to create a
&lt;br&gt;.pot file containing only strings contained in the patches, instead of all
&lt;br&gt;strings contained in the patched files.
&lt;br&gt;&lt;br&gt;However, xgettext silently ignores the diff/patch input file, creating an empty
&lt;br&gt;output file. Renaming the input file with a .php extension doesn't help. It
&lt;br&gt;seems that xgettext actually checks the syntax of the input file and refuses to
&lt;br&gt;work on diff/patch files. Is this an intended behaviour or a bug?
&lt;br&gt;&lt;br&gt;So far, the only way I found is to trick xgettext appending a bogus &amp;quot;&amp;lt;?php&amp;quot; line
&lt;br&gt;to the beginning of the patch, and removing any &amp;quot;?&amp;gt;&amp;quot; in it; but I guess if
&lt;br&gt;there is a more orthodox way to do it...
&lt;br&gt;&lt;br&gt;Cri
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;GPG/PGP Key-Id 0x943A5F0E &amp;nbsp; &amp;nbsp; &amp;nbsp;- &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://www.linux.it/~cri/cri.asc&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linux.it/~cri/cri.asc&lt;/a&gt;&lt;br&gt;&lt;br /&gt; &lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;signature.asc&lt;/strong&gt; (204 bytes) &lt;a href=&quot;http://old.nabble.com/attachment/26362833/0/signature.asc&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---Utils---Bugs-f1828.html&quot; embed=&quot;fixTarget[1828]&quot; target=&quot;_top&quot; &gt;Gnu - Utils - Bugs&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Running-xgettext-on-diff-patch-files-tp26362833p26362833.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26362363</id>
	<title>Re: sed: getting at the current file name</title>
	<published>2009-11-15T11:24:44Z</published>
	<updated>2009-11-15T11:24:44Z</updated>
	<author>
		<name>Ralf Wildenhues</name>
	</author>
	<content type="html">* Ralf Wildenhues wrote on Sat, Nov 14, 2009 at 01:23:01PM CET:
&lt;br&gt;&amp;gt; With --separate and a way to print the current file name we could
&lt;br&gt;&amp;gt; replace the shell loop with two sed invocations. &amp;nbsp;For example, if a
&lt;br&gt;&amp;gt; command `F' would print the file name of the currently open file or `-',
&lt;br&gt;&amp;gt; plus a newline, then one could use:
&lt;br&gt;[...]
&lt;br&gt;&lt;br&gt;Proposed patch, still lacking tests. &amp;nbsp;F is a bit unsymmetric to = wrt.
&lt;br&gt;missing --separate, not sure how to change that; take the name of the
&lt;br&gt;first input file only?
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;Ralf
&lt;br&gt;&lt;br&gt;From 5131e412d337b225f9df3bb49adf62a72d6cf85e Mon Sep 17 00:00:00 2001
&lt;br&gt;From: Ralf Wildenhues &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26362363&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Ralf.Wildenhues@...&lt;/a&gt;&amp;gt;
&lt;br&gt;Date: Sun, 15 Nov 2009 20:11:21 +0100
&lt;br&gt;Subject: [PATCH] New F command to print input file name
&lt;br&gt;&lt;br&gt;2009-11-15 &amp;nbsp;Ralf Wildenhues &amp;nbsp;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26362363&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Ralf.Wildenhues@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * doc/sed.texi (Extended Commands): Document F command.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * doc/sed-in.texi: Regenerate.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * sed/compile.c (compile_program): Accept 'F' if not --posix.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * sed/execute.c (open_next_file): Always initialize in_file_name.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (execute_program): Handle 'F'.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * NEWS: Update.
&lt;br&gt;---
&lt;br&gt;&amp;nbsp;NEWS &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; &amp;nbsp;2 ++
&lt;br&gt;&amp;nbsp;doc/sed-in.texi | &amp;nbsp; &amp;nbsp;7 +++++++
&lt;br&gt;&amp;nbsp;doc/sed.texi &amp;nbsp; &amp;nbsp;| &amp;nbsp; &amp;nbsp;7 +++++++
&lt;br&gt;&amp;nbsp;sed/compile.c &amp;nbsp; | &amp;nbsp; &amp;nbsp;3 ++-
&lt;br&gt;&amp;nbsp;sed/execute.c &amp;nbsp; | &amp;nbsp; 18 +++++++++++++-----
&lt;br&gt;&amp;nbsp;5 files changed, 31 insertions(+), 6 deletions(-)
&lt;br&gt;&lt;br&gt;diff --git a/NEWS b/NEWS
&lt;br&gt;index b34758b..085e758 100644
&lt;br&gt;--- a/NEWS
&lt;br&gt;+++ b/NEWS
&lt;br&gt;@@ -4,6 +4,8 @@ Sed 4.2.2
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;* -u also does unbuffered input, rather than unbuffered output only
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+* New command `F' to print current input file name
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;----------------------------------------------------------------------------
&lt;br&gt;&amp;nbsp;Sed 4.2.1
&lt;br&gt;&amp;nbsp;
&lt;br&gt;diff --git a/doc/sed-in.texi b/doc/sed-in.texi
&lt;br&gt;index 0e64b23..eb48062 100644
&lt;br&gt;--- a/doc/sed-in.texi
&lt;br&gt;+++ b/doc/sed-in.texi
&lt;br&gt;@@ -1400,6 +1400,13 @@ lines, all but the last ending with a back-slash.
&lt;br&gt;&amp;nbsp;In both cases, the results are undefined if the command to be
&lt;br&gt;&amp;nbsp;executed contains a @sc{nul} character.
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+@item F
&lt;br&gt;+@findex F (File name) command
&lt;br&gt;+@cindex Printing file name
&lt;br&gt;+@cindex File name, printing
&lt;br&gt;+Print out the file name of the current input file (with a trailing
&lt;br&gt;+newline).
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;@item L @var{n}
&lt;br&gt;&amp;nbsp;@findex L (fLow paragraphs) command
&lt;br&gt;&amp;nbsp;@cindex Reformat pattern space
&lt;br&gt;diff --git a/doc/sed.texi b/doc/sed.texi
&lt;br&gt;index 66a926e..83d9b8c 100644
&lt;br&gt;--- a/doc/sed.texi
&lt;br&gt;+++ b/doc/sed.texi
&lt;br&gt;@@ -1401,6 +1401,13 @@ lines, all but the last ending with a back-slash.
&lt;br&gt;&amp;nbsp;In both cases, the results are undefined if the command to be
&lt;br&gt;&amp;nbsp;executed contains a @sc{nul} character.
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+@item F
&lt;br&gt;+@findex F (File name) command
&lt;br&gt;+@cindex Printing file name
&lt;br&gt;+@cindex File name, printing
&lt;br&gt;+Print out the file name of the current input file (with a trailing
&lt;br&gt;+newline).
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;@item L @var{n}
&lt;br&gt;&amp;nbsp;@findex L (fLow paragraphs) command
&lt;br&gt;&amp;nbsp;@cindex Reformat pattern space
&lt;br&gt;diff --git a/sed/compile.c b/sed/compile.c
&lt;br&gt;index c4a5250..9e9364d 100644
&lt;br&gt;--- a/sed/compile.c
&lt;br&gt;+++ b/sed/compile.c
&lt;br&gt;@@ -1097,7 +1097,7 @@ compile_program(vector)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (posixicity == POSIXLY_BASIC)
&lt;br&gt;&amp;nbsp;	switch (ch)
&lt;br&gt;&amp;nbsp;	 &amp;nbsp;{
&lt;br&gt;-	 &amp;nbsp; &amp;nbsp;case 'e': case 'v': case 'z': case 'L':
&lt;br&gt;+	 &amp;nbsp; &amp;nbsp;case 'e': case 'F': case 'v': case 'z': case 'L':
&lt;br&gt;&amp;nbsp;	 &amp;nbsp; &amp;nbsp;case 'Q': case 'T': case 'R': case 'W':
&lt;br&gt;&amp;nbsp;	 &amp;nbsp; &amp;nbsp; &amp;nbsp;bad_command(ch);
&lt;br&gt;&amp;nbsp;
&lt;br&gt;@@ -1230,6 +1230,7 @@ compile_program(vector)
&lt;br&gt;&amp;nbsp;	case '=':
&lt;br&gt;&amp;nbsp;	case 'd':
&lt;br&gt;&amp;nbsp;	case 'D':
&lt;br&gt;+	case 'F':
&lt;br&gt;&amp;nbsp;	case 'g':
&lt;br&gt;&amp;nbsp;	case 'G':
&lt;br&gt;&amp;nbsp;	case 'h':
&lt;br&gt;diff --git a/sed/execute.c b/sed/execute.c
&lt;br&gt;index 28e520d..f9775ea 100644
&lt;br&gt;--- a/sed/execute.c
&lt;br&gt;+++ b/sed/execute.c
&lt;br&gt;@@ -714,6 +714,12 @@ open_next_file(name, input)
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp;input-&amp;gt;read_fn = read_file_line;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+ &amp;nbsp;if (follow_symlinks)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;input-&amp;gt;in_file_name = follow_symlink (name);
&lt;br&gt;+ &amp;nbsp;else
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;input-&amp;gt;in_file_name = name;
&lt;br&gt;+
&lt;br&gt;+
&lt;br&gt;&amp;nbsp; &amp;nbsp;if (in_place_extension)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;int input_fd;
&lt;br&gt;@@ -724,11 +730,6 @@ open_next_file(name, input)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;memset (&amp;old_fscreatecon, 0, sizeof (old_fscreatecon));
&lt;br&gt;&amp;nbsp;#endif
&lt;br&gt;&amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;if (follow_symlinks)
&lt;br&gt;-	input-&amp;gt;in_file_name = follow_symlink (name);
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;else
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;input-&amp;gt;in_file_name = name;
&lt;br&gt;-
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/* get the base name */
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;tmpdir = ck_strdup(input-&amp;gt;in_file_name);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if ((p = strrchr(tmpdir, '/')))
&lt;br&gt;@@ -1758,6 +1759,13 @@ execute_program(vec, input)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;flush_output(output_file.fp);
&lt;br&gt;&amp;nbsp;	 &amp;nbsp; &amp;nbsp; &amp;nbsp;break;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+	 &amp;nbsp; &amp;nbsp;case 'F':
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;output_missing_newline(&amp;output_file);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;fprintf(output_file.fp, &amp;quot;%s\n&amp;quot;,
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;input-&amp;gt;in_file_name);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;flush_output(output_file.fp);
&lt;br&gt;+	 &amp;nbsp; &amp;nbsp; &amp;nbsp;break;
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;	 &amp;nbsp; &amp;nbsp;default:
&lt;br&gt;&amp;nbsp;	 &amp;nbsp; &amp;nbsp; &amp;nbsp;panic(&amp;quot;INTERNAL ERROR: Bad cmd %c&amp;quot;, cur_cmd-&amp;gt;cmd);
&lt;br&gt;&amp;nbsp;	 &amp;nbsp; &amp;nbsp;}
&lt;br&gt;-- 
&lt;br&gt;1.6.5.1.31.gad12b
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---Utils---Bugs-f1828.html&quot; embed=&quot;fixTarget[1828]&quot; target=&quot;_top&quot; &gt;Gnu - Utils - Bugs&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/sed%3A-getting-at-the-current-file-name-tp26349599p26362363.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26352544</id>
	<title>Re: at configure</title>
	<published>2009-11-14T10:30:59Z</published>
	<updated>2009-11-14T10:30:59Z</updated>
	<author>
		<name>Aharon Robbins</name>
	</author>
	<content type="html">&amp;gt; Aharon Robbins &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26352544&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;arnold@...&lt;/a&gt;&amp;gt; writes:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; There should be a version of awk on any Unix-like OS
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Unless you are bootstrapping it :-) The GNU make sources include a
&lt;br&gt;&amp;gt; script so that you can build it without any make program. &amp;nbsp;You still
&lt;br&gt;&amp;gt; need to be able to run configure, though.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Andreas.
&lt;br&gt;&lt;br&gt;Again, if you're bootstrapping, you're doing it from some kind
&lt;br&gt;of existing environment, and that one should have some sort of
&lt;br&gt;awk already there.
&lt;br&gt;&lt;br&gt;Ah well.
&lt;br&gt;&lt;br&gt;Thanks everyone.
&lt;br&gt;&lt;br&gt;Arnold
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Gnu---Utils---Bugs-f1828.html&quot; embed=&quot;fixTarget[1828]&quot; target=&quot;_top&quot; &gt;Gnu - Utils - Bugs&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/at-configure-tp26319799p26352544.html" />
</entry>

</feed>
