Kezdőlap › Fórumok › Programozás › php, iconv, ssh, perl turmix. De hogyan?
- This topic has 32 hozzászólás, 6 résztvevő, and was last updated 17 years, 8 months telt el by
gabaman.
-
SzerzőBejegyzés
-
2007-10-20-15:34 #2134905
Tévedek, ha azt képzelem, hogy a LANG állítja a CHARSET-et is?
2007-10-20-15:34 #2134906Tévedek, ha azt képzelem, hogy a LANG állítja a CHARSET-et is?
2007-10-20-15:40 #2134907linuxforum wrote:Tévedek, ha azt képzelem, hogy a LANG állítja a CHARSET-et is?Sajnos igen. Nem történik semmilyen változó állítgatás. Az idn megnézi a CHARSET tartalmát, ha üres, akkor meg a LANG-et (régebbi Debianon az LC_ALL-t). Ha rossz az érték (pl. ISO-8859-2 a hu_HU.ISO8859-2 helyett) akkor az ISO-8859-1 lesz a kódolás.
2007-10-20-15:40 #2134908linuxforum wrote:Tévedek, ha azt képzelem, hogy a LANG állítja a CHARSET-et is?Sajnos igen. Nem történik semmilyen változó állítgatás. Az idn megnézi a CHARSET tartalmát, ha üres, akkor meg a LANG-et (régebbi Debianon az LC_ALL-t). Ha rossz az érték (pl. ISO-8859-2 a hu_HU.ISO8859-2 helyett) akkor az ISO-8859-1 lesz a kódolás.
2007-10-20-15:58 #2134909Javaslom, olvasd el:
http://hu.php.net/manual/hu/function.iconv.php
Nekem még soha nem volt problémám az iconv() php függvénnyel.2007-10-20-15:58 #2134910Javaslom, olvasd el:
http://hu.php.net/manual/hu/function.iconv.php
Nekem még soha nem volt problémám az iconv() php függvénnyel.2007-10-20-16:09 #2134911Köszönöm a javaslatot, de nekem sem az iconvval van problémám, hanem az idnnel. De azért elolvasom. 🙂
2007-10-20-16:09 #2134912Köszönöm a javaslatot, de nekem sem az iconvval van problémám, hanem az idnnel. De azért elolvasom. 🙂
2007-10-20-16:19 #2134913Nem igazán értelek miért nem próbálod ki amit írtam, pedig működik:
UTF-8 teszt:
$ idn –debug ékezetes.hu
libidn 0.6.8
Copyright 2002, 2003, 2004, 2005 Simon Josefsson.
GNU Libidn comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Libidn under the terms of
the GNU Lesser General Public License. For more information
about these matters, see the file named COPYING.LIB.
Charset `UTF-8′.
input[0] = U+00e9
input[1] = U+006b
input[2] = U+0065
input[3] = U+007a
input[4] = U+0065
input[5] = U+0074
input[6] = U+0065
input[7] = U+0073
input[8] = U+002e
input[9] = U+0068
input[10] = U+0075
tld[0] = U+00e9
tld[1] = U+006b
tld[2] = U+0065
tld[3] = U+007a
tld[4] = U+0065
tld[5] = U+0074
tld[6] = U+0065
tld[7] = U+0073
tld[8] = U+002e
tld[9] = U+0068
tld[10] = U+0075
output[0] = U+0078
output[1] = U+006e
output[2] = U+002d
output[3] = U+002d
output[4] = U+006b
output[5] = U+0065
output[6] = U+007a
output[7] = U+0065
output[8] = U+0074
output[9] = U+0065
output[10] = U+0073
output[11] = U+002d
output[12] = U+0039
output[13] = U+0078
output[14] = U+0061
output[15] = U+002e
output[16] = U+0068
output[17] = U+0075
xn--kezetes-9xa.huISO-8859-2 teszt:
$ echo „ékezetes.hu” >test.txt
$ iconv -f utf-8 -t iso-8859-2 -o test2.txt test.txt
$ cat test2.txt | CHARSET=”ISO-8859-2″ idn –debug
libidn 0.6.8
Copyright 2002, 2003, 2004, 2005 Simon Josefsson.
GNU Libidn comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Libidn under the terms of
the GNU Lesser General Public License. For more information
about these matters, see the file named COPYING.LIB.
Charset `ISO-8859-2′.
Type each input string on a line by itself, terminated by a newline character.
input[0] = U+00e9
input[1] = U+006b
input[2] = U+0065
input[3] = U+007a
input[4] = U+0065
input[5] = U+0074
input[6] = U+0065
input[7] = U+0073
input[8] = U+002e
input[9] = U+0068
input[10] = U+0075
tld[0] = U+00e9
tld[1] = U+006b
tld[2] = U+0065
tld[3] = U+007a
tld[4] = U+0065
tld[5] = U+0074
tld[6] = U+0065
tld[7] = U+0073
tld[8] = U+002e
tld[9] = U+0068
tld[10] = U+0075
output[0] = U+0078
output[1] = U+006e
output[2] = U+002d
output[3] = U+002d
output[4] = U+006b
output[5] = U+0065
output[6] = U+007a
output[7] = U+0065
output[8] = U+0074
output[9] = U+0065
output[10] = U+0073
output[11] = U+002d
output[12] = U+0039
output[13] = U+0078
output[14] = U+0061
output[15] = U+002e
output[16] = U+0068
output[17] = U+0075
xn--kezetes-9xa.hu2007-10-20-16:19 #2134914Nem igazán értelek miért nem próbálod ki amit írtam, pedig működik:
UTF-8 teszt:
$ idn –debug ékezetes.hu
libidn 0.6.8
Copyright 2002, 2003, 2004, 2005 Simon Josefsson.
GNU Libidn comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Libidn under the terms of
the GNU Lesser General Public License. For more information
about these matters, see the file named COPYING.LIB.
Charset `UTF-8′.
input[0] = U+00e9
input[1] = U+006b
input[2] = U+0065
input[3] = U+007a
input[4] = U+0065
input[5] = U+0074
input[6] = U+0065
input[7] = U+0073
input[8] = U+002e
input[9] = U+0068
input[10] = U+0075
tld[0] = U+00e9
tld[1] = U+006b
tld[2] = U+0065
tld[3] = U+007a
tld[4] = U+0065
tld[5] = U+0074
tld[6] = U+0065
tld[7] = U+0073
tld[8] = U+002e
tld[9] = U+0068
tld[10] = U+0075
output[0] = U+0078
output[1] = U+006e
output[2] = U+002d
output[3] = U+002d
output[4] = U+006b
output[5] = U+0065
output[6] = U+007a
output[7] = U+0065
output[8] = U+0074
output[9] = U+0065
output[10] = U+0073
output[11] = U+002d
output[12] = U+0039
output[13] = U+0078
output[14] = U+0061
output[15] = U+002e
output[16] = U+0068
output[17] = U+0075
xn--kezetes-9xa.huISO-8859-2 teszt:
$ echo „ékezetes.hu” >test.txt
$ iconv -f utf-8 -t iso-8859-2 -o test2.txt test.txt
$ cat test2.txt | CHARSET=”ISO-8859-2″ idn –debug
libidn 0.6.8
Copyright 2002, 2003, 2004, 2005 Simon Josefsson.
GNU Libidn comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Libidn under the terms of
the GNU Lesser General Public License. For more information
about these matters, see the file named COPYING.LIB.
Charset `ISO-8859-2′.
Type each input string on a line by itself, terminated by a newline character.
input[0] = U+00e9
input[1] = U+006b
input[2] = U+0065
input[3] = U+007a
input[4] = U+0065
input[5] = U+0074
input[6] = U+0065
input[7] = U+0073
input[8] = U+002e
input[9] = U+0068
input[10] = U+0075
tld[0] = U+00e9
tld[1] = U+006b
tld[2] = U+0065
tld[3] = U+007a
tld[4] = U+0065
tld[5] = U+0074
tld[6] = U+0065
tld[7] = U+0073
tld[8] = U+002e
tld[9] = U+0068
tld[10] = U+0075
output[0] = U+0078
output[1] = U+006e
output[2] = U+002d
output[3] = U+002d
output[4] = U+006b
output[5] = U+0065
output[6] = U+007a
output[7] = U+0065
output[8] = U+0074
output[9] = U+0065
output[10] = U+0073
output[11] = U+002d
output[12] = U+0039
output[13] = U+0078
output[14] = U+0061
output[15] = U+002e
output[16] = U+0068
output[17] = U+0075
xn--kezetes-9xa.hu -
SzerzőBejegyzés
- Be kell jelentkezni a hozzászóláshoz.
legutóbbi hsz