zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: Enable D07multibyte.ztst for locales ending in .utf8
@ 2009-04-26 17:18 Paul Ackersviller
  2009-04-27  3:11 ` Paul Ackersviller
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Ackersviller @ 2009-04-26 17:18 UTC (permalink / raw)
  To: zsh-workers

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=unknown-8bit, Size: 1105 bytes --]

I had closer look at why Test/D07multibyte.ztst was being skipped on
HP-UX 11.11, I guess it was just too obvious to spot sooner.  The locale
on the system is en_US.utf8, but that name was being transformed before use.
Unfortunately NetBSD's problem isn't the same, so that's still to debug.

Either line modified in the following path is sufficient to get the test
running, take your pick if you want either or both.


Index: Test/D07multibyte.ztst
===================================================================
RCS file: /cvsroot/zsh/zsh/Test/D07multibyte.ztst,v
retrieving revision 1.29
diff -u -r1.29 D07multibyte.ztst
--- Test/D07multibyte.ztst	10 Mar 2009 11:12:03 -0000	1.29
+++ Test/D07multibyte.ztst	26 Apr 2009 17:03:39 -0000
@@ -5,8 +5,8 @@
 # Don't let LC_* override our choice of locale.
   unset -m LC_\*
   mb_ok=
-  langs=(en_US.UTF-8 en_GB.UTF-8 en.UTF-8
-	 $(locale -a 2>/dev/null | sed -e 's/utf8/UTF-8/' | grep UTF-8))
+  langs=(en_{US,GB}.{UTF-,utf}8 en.UTF-8
+	 $(locale -a 2>/dev/null | egrep 'utf8|UTF-8'))
   for LANG in $langs; do
     if [[ é = ? ]]; then
       mb_ok=1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: PATCH: Enable D07multibyte.ztst for locales ending in .utf8
  2009-04-26 17:18 PATCH: Enable D07multibyte.ztst for locales ending in .utf8 Paul Ackersviller
@ 2009-04-27  3:11 ` Paul Ackersviller
  2009-04-27  9:08   ` Peter Stephenson
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Ackersviller @ 2009-04-27  3:11 UTC (permalink / raw)
  To: zsh-workers

On Sun, Apr 26, 2009 at 05:18:21PM +0000, Paul Ackersviller wrote:
> I had closer look at why Test/D07multibyte.ztst was being skipped on
> HP-UX 11.11, I guess it was just too obvious to spot sooner.  The locale
> on the system is en_US.utf8, but that name was being transformed before use.

A bit of elaboration on this, since I was surprised to find the locales
on my Linux boxen also named en_US.utf8, etc.  How could the orginal
test script have been working then?  It appears that on Linux you can
set LANG=en_US.UTF-8 and get the (presumably) desired result.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: PATCH: Enable D07multibyte.ztst for locales ending in .utf8
  2009-04-27  3:11 ` Paul Ackersviller
@ 2009-04-27  9:08   ` Peter Stephenson
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Stephenson @ 2009-04-27  9:08 UTC (permalink / raw)
  To: zsh-workers

On Mon, 27 Apr 2009 03:11:26 +0000
Paul Ackersviller <pda@sdf.lonestar.org> wrote:
> On Sun, Apr 26, 2009 at 05:18:21PM +0000, Paul Ackersviller wrote:
> > I had closer look at why Test/D07multibyte.ztst was being skipped on
> > HP-UX 11.11, I guess it was just too obvious to spot sooner.  The locale
> > on the system is en_US.utf8, but that name was being transformed before use.
> 
> A bit of elaboration on this, since I was surprised to find the locales
> on my Linux boxen also named en_US.utf8, etc.  How could the orginal
> test script have been working then?  It appears that on Linux you can
> set LANG=en_US.UTF-8 and get the (presumably) desired result.

Possibly this changed in the meanwhile but it looks like it doesn't care.
"UTF-8" is what's retrieved by nl_langinfo(CODESET).

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-04-27  9:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-26 17:18 PATCH: Enable D07multibyte.ztst for locales ending in .utf8 Paul Ackersviller
2009-04-27  3:11 ` Paul Ackersviller
2009-04-27  9:08   ` Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).