Re: Fix UTF Encoding issue
- From
- Martin Koegler <mkoegler@auto.tuwien.ac.at>
- Date
- Dec 4, 2007, 08:20 UTC
- Message-ID
- <20071204082021.GE31042@auto.tuwien.ac.at>
- In-Reply-To
- <200712041012.50935.ismail@pardus.org.tr>
On Tue, Dec 04, 2007 at 10:12:50AM +0200, Ismail Dönmez wrote:
Show 9 quoted lines
> I think just a better method is to use (not tested):
>
> if( is_utf8($str) )
> {
> return decode_utf8($str);
> }
> else {
> return decode($str);
> }I already tried this function. It does not test, if a string is really UTF-8. It seems to be to intended to check, if perl stores the string internally in a multi byte encoding.
mfg Martin Kögler.