php, iconv, ssh, perl turmix. De hogyan?

Kezdőlap Fórumok Programozás php, iconv, ssh, perl turmix. De hogyan?

10 bejegyzés megtekintése - 21-30 / 33
  • Szerző
    Bejegyzés
  • #2134905
    linuxforum
    Felhasználó

      Tévedek, ha azt képzelem, hogy a LANG állítja a CHARSET-et is?

      #2134906
      linuxforum
      Felhasználó

        Tévedek, ha azt képzelem, hogy a LANG állítja a CHARSET-et is?

        #2134907
        gabaman
        Felhasználó
          linuxforum 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.

          #2134908
          gabaman
          Felhasználó
            linuxforum 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.

            #2134909
            kayapo
            Felhasználó

              Javaslom, 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.

              #2134910
              kayapo
              Felhasználó

                Javaslom, 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.

                #2134911
                linuxforum
                Felhasználó

                  Köszönöm a javaslatot, de nekem sem az iconvval van problémám, hanem az idnnel. De azért elolvasom. 🙂

                  #2134912
                  linuxforum
                  Felhasználó

                    Köszönöm a javaslatot, de nekem sem az iconvval van problémám, hanem az idnnel. De azért elolvasom. 🙂

                    #2134913
                    gabaman
                    Felhasználó

                      Nem 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.hu

                      ISO-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

                      #2134914
                      gabaman
                      Felhasználó

                        Nem 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.hu

                        ISO-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

                      10 bejegyzés megtekintése - 21-30 / 33
                      • Be kell jelentkezni a hozzászóláshoz.