2007/11/24, Joe Neeman <[EMAIL PROTECTED]>:
> In order to fix bug 499, I tried to write a simple function that replaces all
> whitespace by spaces. My first attempt was pretty stupid -- I forgot that the
> string was in utf-8. This caused problems for "uiop" on the bug list. So I
> wrote a utf-8 version using mbrtowc and iswspace, but this fails if I set
> LC_ALL=ASCII because mbrtowc then thinks that all accented characters are
> invalid utf-8 sequences.

Do we have a use case for LC_ALL=ASCII ? Since we are using utf-8
everywhere, we might as well unset or overried LC_ALL in main().

> I suppose I could iconv to wchar_t, search, replace and iconv back but it
> seems that we don't currently depend on iconv and introducing a dependency
> seems like overkill. Am I missing something simple?

there is a int -> utf-8 routine in general-scheme.cc; I imagine it
would not be difficult to add a utf-8 -> int routine and use both to
the conversion without iconv.

-- 
Han-Wen Nienhuys - [EMAIL PROTECTED] - http://www.xs4all.nl/~hanwen


_______________________________________________
lilypond-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to