[fpc-devel] lazarus bug report + fix: Utf8ToUnicode doesn't work correctly

Michael Van Canneyt michael at freepascal.org
Wed May 4 14:33:41 CEST 2005



On Wed, 4 May 2005, Michalis Kamburelis wrote:

> Michael Van Canneyt wrote:
> > 
> > On Wed, 4 May 2005, Jonas Maebe wrote:
> > 
> > 
> > > On 4 mei 2005, at 12:04, Michael Van Canneyt wrote:
> > > 
> > > 
> > > > > It contains a fixed version of the Utf8ToUnicode function.
> > > > > Since it
> > > > > is part of
> > > > > the rtl, I close this lazarus issue and send you this message.
> > > > > I did
> > > > > not test
> > > > > the fixed version.
> > > > 
> > > > The files in the zip file are not usable; They're in some unicode
> > > > format,
> > > > which
> > > > I can't use nor check on Linux.
> > > 
> > > They're plain UTF-8. I know for a fact there are editors under Linux
> > > which
> > > support that (at least emacs does, and it would surprise me immensely
> > > if vim
> > > doesn't). Anyway, here's the plain ascii version of the "-fixed" file.
> > 
> > 
> > I already got it from Vincent and applied the patch. But:
> > - diff doesn't grok unicode.
> > - "joe" doesn't grok it either.
> > - "kate" & "kwrite" - no grok.
> > - PFE (Windows) doesn't grok it either.   - Apparently vim converts to
> > plain ascii before editing.
> 
> I didn't look at this patch, but if it's really UTF-8 then you can open the
> patch in Emacs (use `C-x <RET> c utf-8 <RET> C-x C-f FILENAME <RET>' to make
> sure that utf-8 will be understood), make sure you're in diff-mode (`M-x
> diff-mode' if necessary), then `C-c C-a' (or `M-x diff-apply-hunk') will apply
> hunks of the patch. I don't know does it solve the problems here (especially
> since FPC doesn't grok unicode...) but it's a painless way to apply patch
> encoded in UTF-8.

Except for a small flaw: I don't have emacs installed :-)

Michael.




More information about the fpc-devel mailing list