[vlc-devel] [PATCH 1/2] lua: add a guess_encoding function to convert Latin1 to UTF8

Rémi Denis-Courmont remi at remlab.net
Tue Aug 27 17:45:58 CEST 2013

Le mardi 27 août 2013 16:35:13 Jean-Baptiste Kempf a écrit :
> On 27 Aug, Rémi Denis-Courmont wrote :
> > On Tue, 27 Aug 2013 16:28:13 +0200, Jean-Baptiste Kempf <jb at videolan.org>
> > 
> > wrote:
> > > On 27 Aug, Rémi Denis-Courmont wrote :
> > >> There was no error, and there is no empty string. This is irrelevant.
> > > 
> > > But the displayed string is wrong.
> > 
> > Of course. Converting from the wrong character set gives wrong output,
> > which shows as wrong display. Thank you for proving my point.
> The posted patches were actually correctly displaying the text in all
> the three use cases. Yet you claim "There is no point in doing this",

So I did and I stick to it.

As I already wrote, there is no point in doing this because Lua already has 
all it needs, minding that IsUTF8() can be implemented with FromCharset().

Then I implied it was architecturally unclean, because it is too specialized 
to be exposed in vlc.string, but that's just an opinion. However, I do 
emphasize, in support of that opinion, that GuessEncoding() is not exposed in 
the native interface, but rather burried in the M3U parser.

> and yet your solution fails in at least one use case out of three.

My solution works and it is now even proven. Offense taken.

> There was a point in doing this, because it had correct output.

I only ever challenged the solution, not the problem.

Rémi Denis-Courmont

More information about the vlc-devel mailing list