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

Ludovic Fauvet etix at videolan.org
Tue Aug 27 15:57:33 CEST 2013


On 08/27/2013 03:49 PM, Rémi Denis-Courmont wrote:
> On Tue, 27 Aug 2013 15:15:52 +0200, Ludovic Fauvet <etix at videolan.org>
> wrote:
>> ---
>>  modules/lua/libs/strings.c | 17 +++++++++++++++++
>>  1 file changed, 17 insertions(+)
> 
> There is no point in doing this. from_charset already provides all that's
> needed (and is much sounder architecturally).

The from_charset function doesn't provide feedback nor failure if the
input string doesn't match the expected encoding thus we can't use it
for strings already encoded in UTF8.

Or did I miss something?

-- 
Ludovic Fauvet
www.videolan.org



More information about the vlc-devel mailing list