Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > it.comp.www.php > #20598

Re: query db

From Alessandro Pellizzari <shuriken@amiran.it>
Newsgroups it.comp.www.php
Subject Re: query db
Date 2016-04-03 13:32 +0000
Message-ID <dmckb9F2tueU1@mid.individual.net> (permalink)
References <2016032610042321718@mynewsgate.net> <nd5p61$2hk7$1@adenine.netfront.net> <ndomba$1lvt$1@gioia.aioe.org> <dmao3qFjbctU1@mid.individual.net> <ndqvpf$1lkf$1@adenine.netfront.net>

Show all headers | View raw


Il Sun, 03 Apr 2016 13:45:51 +0200, Alex ha scritto:

> Troppo giusto. Il set di caratteri può anche dare qualche grattacapo
> però.
> Per esempio una stringa come D' Arquà Petrarca  oppure  Mac O'Brièn che
> hanno di tutto, come le risolvi? Bisogna inserirle in tabella, farci la
> ricerca e ritornarle al browser.

Non so se ho capito bene cosa intendi.

Per il charset sul DB dipende da come l'hai configurato. In PotgreSQL 
basta selezionare utf8 e metti quello che vuoi, mentre in MySQL devi stare 
attento perché ce ne sono due: utf8 che non supporta i alcuni caratteri 
(cinesi, giapponesi, klingon, elfico, ecc.) e utf8mb4 che è il "vero" utf8 
che supporta tutto.

Una volta che hai uniformato tutto (db, header http, meta charset 
nell'html, ecc.) a utf8 (quello vero), è esattamente la stessa cosa che 
con ASCII semplice (se usi *_escape_string() o PDO, appunto).

Bye.

Back to it.comp.www.php | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

query db "Halnow" <21718invalid@mynewsgate.net> - 2016-03-26 10:04 +0000
  Re: query db Alex <tommaso5ita@yahoo.it> - 2016-03-26 11:44 +0100
    Re: query db Enrico Maria Chellini <bitit@bitit.it> - 2016-04-02 16:52 +0200
      Re: query db Alessandro Pellizzari <shuriken@amiran.it> - 2016-04-02 20:24 +0000
        Re: query db Alex <tommaso5ita@yahoo.it> - 2016-04-03 13:45 +0200
          Re: query db Alessandro Pellizzari <shuriken@amiran.it> - 2016-04-03 13:32 +0000
            Re: query db Alex <tommaso5ita@yahoo.it> - 2016-04-03 18:30 +0200
              Re: query db Alessandro Pellizzari <shuriken@amiran.it> - 2016-04-03 18:12 +0000
                Re: query db Alex <tommaso5ita@yahoo.it> - 2016-04-04 11:05 +0200
  Re: query db Alessandro Pellizzari <shuriken@amiran.it> - 2016-03-26 17:48 +0000

csiph-web