Re: Automatic locale detection? - Mailing list pgsql-general

From Lexington Luthor
Subject Re: Automatic locale detection?
Date
Msg-id [email protected]
Whole thread Raw
In response to Automatic locale detection?  (Matthew Peter <[email protected]>)
List pgsql-general
Matthew Peter wrote:
> Is it possible to automatically detect the language encoding of incoming
> data? For instance if Japanese is used, is there a way to know it is
> Japanese from a bit in the charset, a dictionary-based evaluation or
> otherwise?
>

Have a look at http://www.mozilla.org/projects/intl/chardet.html and
http://chardet.feedparser.org/ for some implementations of this idea.

These detectors are often inaccurate though (and sometimes fail
completely), see the warning at the bottom of
http://chardet.feedparser.org/docs/supported-encodings.html

Regards,
LL

pgsql-general by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: Automatic locale detection?
Next
From: "Merlin Moncure"
Date:
Subject: Re: PL/SQL: function call like $1($2)