Re: [PHP] convert (windows-1250) to (utf-8)

2007-08-16 Thread Martin Marques

Alain Roger wrote:

Hi,

I import a csv file (which includes characters from windows-1250 charset)
to postgreSQL database which is in UTF-8.
How can i convert windows-1250 to utf-8 charset ?


This is a PostgreSQL question.

Check client_encoding and server_encoding.

--
 21:50:04 up 2 days,  9:07,  0 users,  load average: 0.92, 0.37, 0.18
-
Lic. Martín Marqués |   SELECT 'mmarques' ||
Centro de Telemática|   '@' || 'unl.edu.ar';
Universidad Nacional|   DBA, Programador,
del Litoral |   Administrador
-

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] convert (windows-1250) to (utf-8)

2007-08-12 Thread Alain Roger
and why not :
$out = iconv('windows-1250','UTF-8', $in); ???

Alain

On 8/12/07, brian [EMAIL PROTECTED] wrote:

 Alain Roger wrote:
  Hi,
 
  I import a csv file (which includes characters from windows-1250
 charset)
  to postgreSQL database which is in UTF-8.
  How can i convert windows-1250 to utf-8 charset ?
 

 Try the iconv functions:

 http://www.php.net/manual/en/function.iconv.php

 $out = iconv('ISO-8859-2', 'UTF-8', $in);

 This page may be of use, as well:
 http://en.wikipedia.org/wiki/Windows-1250

 Windows-1250 is *similar* to ISO-8859-2 ...

 brian

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Alain

Windows XP SP2
PostgreSQL 8.2.3
Apache 2.2.4
PHP 5.2.3


Re: [PHP] convert (windows-1250) to (utf-8)

2007-08-12 Thread Tijnema
On 8/12/07, Alain Roger [EMAIL PROTECTED] wrote:
 and why not :
 $out = iconv('windows-1250','UTF-8', $in); ???

 Alain

Did you test if that works? I doubt it, as windows-1250 isn't listed
on the homepage of libiconv:
http://www.gnu.org/software/libiconv/

Tijnema

 On 8/12/07, brian [EMAIL PROTECTED] wrote:
 
  Alain Roger wrote:
   Hi,
  
   I import a csv file (which includes characters from windows-1250
  charset)
   to postgreSQL database which is in UTF-8.
   How can i convert windows-1250 to utf-8 charset ?
  
 
  Try the iconv functions:
 
  http://www.php.net/manual/en/function.iconv.php
 
  $out = iconv('ISO-8859-2', 'UTF-8', $in);
 
  This page may be of use, as well:
  http://en.wikipedia.org/wiki/Windows-1250
 
  Windows-1250 is *similar* to ISO-8859-2 ...
 
  brian
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 


 --
 Alain
 
 Windows XP SP2
 PostgreSQL 8.2.3
 Apache 2.2.4
 PHP 5.2.3



-- 
Vote for PHP Color Coding in Gmail! - http://gpcc.tijnema.info

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] convert (windows-1250) to (utf-8)

2007-08-12 Thread Alain Roger
I've tested it and it works well.
i got some issue when i used ISO-8859-2.

Al

On 8/12/07, Tijnema [EMAIL PROTECTED] wrote:

 On 8/12/07, Alain Roger [EMAIL PROTECTED] wrote:
  and why not :
  $out = iconv('windows-1250','UTF-8', $in); ???
 
  Alain

 Did you test if that works? I doubt it, as windows-1250 isn't listed
 on the homepage of libiconv:
 http://www.gnu.org/software/libiconv/

 Tijnema
 
  On 8/12/07, brian [EMAIL PROTECTED] wrote:
  
   Alain Roger wrote:
Hi,
   
I import a csv file (which includes characters from windows-1250
   charset)
to postgreSQL database which is in UTF-8.
How can i convert windows-1250 to utf-8 charset ?
   
  
   Try the iconv functions:
  
   http://www.php.net/manual/en/function.iconv.php
  
   $out = iconv('ISO-8859-2', 'UTF-8', $in);
  
   This page may be of use, as well:
   http://en.wikipedia.org/wiki/Windows-1250
  
   Windows-1250 is *similar* to ISO-8859-2 ...
  
   brian
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
  
  
 
 
  --
  Alain
  
  Windows XP SP2
  PostgreSQL 8.2.3
  Apache 2.2.4
  PHP 5.2.3
 


 --
 Vote for PHP Color Coding in Gmail! - http://gpcc.tijnema.info




-- 
Alain

Windows XP SP2
PostgreSQL 8.2.3
Apache 2.2.4
PHP 5.2.3


[PHP] convert (windows-1250) to (utf-8)

2007-08-11 Thread Alain Roger
Hi,

I import a csv file (which includes characters from windows-1250 charset)
to postgreSQL database which is in UTF-8.
How can i convert windows-1250 to utf-8 charset ?

thanks a lot,

-- 
Alain

Windows XP SP2
PostgreSQL 8.2.3
Apache 2.2.4
PHP 5.2.3


Re: [PHP] convert (windows-1250) to (utf-8)

2007-08-11 Thread Tijnema
On 8/11/07, Alain Roger [EMAIL PROTECTED] wrote:
 Hi,

 I import a csv file (which includes characters from windows-1250 charset)
 to postgreSQL database which is in UTF-8.
 How can i convert windows-1250 to utf-8 charset ?

 thanks a lot,

 --

I personally never worked with different charsets, but this might help you:
http://www.php.net/manual/en/function.mb-convert-encoding.php

Tijnema

-- 
Vote for PHP Color Coding in Gmail! - http://gpcc.tijnema.info

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] convert (windows-1250) to (utf-8)

2007-08-11 Thread brian

Alain Roger wrote:

Hi,

I import a csv file (which includes characters from windows-1250 charset)
to postgreSQL database which is in UTF-8.
How can i convert windows-1250 to utf-8 charset ?



Try the iconv functions:

http://www.php.net/manual/en/function.iconv.php

$out = iconv('ISO-8859-2', 'UTF-8', $in);

This page may be of use, as well:
http://en.wikipedia.org/wiki/Windows-1250

Windows-1250 is *similar* to ISO-8859-2 ...

brian

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php