Encoding e o PHP 5

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    1 Favorite

    Encoding e o PHP 5 - Presentation Transcript

    1. Augusto
Pascutti
 Augusto
Pascutti
‐
ConaPHP
2008
 1

    2.   Graduando
em
Sistemas
de
Informações
   Programador
a
4
anos
   Especialista
em
soluções
Web
   Zend
Certified
Engineer
   Trabalha
atualmente
na
Gráficos
Burti
 Augusto
Pascutti
‐
ConaPHP
2008
 2

    3.   O
que
é
encoding
   Alguns
encodings
existentes
   Unicode
   Problemas
mais
comuns
   Solucões
 Augusto
Pascutti
‐
ConaPHP
2008
 3

    4.   Ajax
   Internacionalização
   Comunicação
com
outros
S.O.
   Webservices
   RSS
 Augusto
Pascutti
‐
ConaPHP
2008
 4

    5. Augusto
Pascutti
‐
ConaPHP
2008
 5

    6.   O
que
é
um
Caractere
?
   O
que
é
um
Conjunto
de
Caracteres
?
   Encoding:
Conjunto
de
caracteres
codificados
   Alguns
encodings
existentes:
   ASCII
(1968)
   ISO‐8859‐1
(1985
‐
2004)
   UTF‐8
(1993)
 Augusto
Pascutti
‐
ConaPHP
2008
 6

    7.   Oficialmente
desde
1968
   7
bits
   128
caracteres
   Contempla
todos
os
caracteres
ingleses
 Augusto
Pascutti
‐
ConaPHP
2008
 7

    8.   Diversos
“sets”
com
256
caracteres
cada
   Um
set
para
cada
língua
   Caracteres
acentuados
!
 Augusto
Pascutti
‐
ConaPHP
2008
 8

    9.   Universal
Character
Set
   Compreende
todas
as
línguas
conhecidas
   UTF‐8,
UTF‐16,
UTF‐32
   Multi‐byte
   UTF‐8
compatível
com
ASCII
 Augusto
Pascutti
‐
ConaPHP
2008
 9

    10.   Comunicação
com
outros
aplicativos/serviços
   Ajax
   Webservices
   Feeds
 Augusto
Pascutti
‐
ConaPHP
2008
 10

    11.   Informar
encoding
utilizado
   HTML
   PHP

   XML
   text/plain
 Augusto
Pascutti
‐
ConaPHP
2008
 11

    12.   HTML
 <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/> Augusto
Pascutti
‐
ConaPHP
2008
 12

    13.   HTML
(
Ooops
….
)
 Augusto
Pascutti
‐
ConaPHP
2008
 13

    14.   PHP
,
XML,

text/plain
 Augusto
Pascutti
‐
ConaPHP
2008
 14

    15.   Caracteres
Multi‐byte
e
funções
de
string
   strlen()
   substr()
   strtoupper()
   split()
 








.
 








.
 








.
 Augusto
Pascutti
‐
ConaPHP
2008
 15

    16.   strlen()
 Augusto
Pascutti
‐
ConaPHP
2008
 16

    17.   substr()
 Augusto
Pascutti
‐
ConaPHP
2008
 17

    18.   Iconv
   Mbstring
   PHP
6
 Augusto
Pascutti
‐
ConaPHP
2008
 18

    19.   Glibc
   Habilitado
por
padrão
no
PHP
5
   Mais
lenta
que
a
mbstring
   Boa
para
conversão
de
strings
   Trava
em
strings
mal
formadas
 Augusto
Pascutti
‐
ConaPHP
2008
 19

    20.   iconv()
   iconv_strlen()
   iconv_strpos()
   iconv_substr()
   iconv_set_encoding()
   ob_iconv_handler()
 Augusto
Pascutti
‐
ConaPHP
2008
 20

    21.   iconv_strlen()
 Augusto
Pascutti
‐
ConaPHP
2008
 21

    22.   iconv_substr()
 Augusto
Pascutti
‐
ConaPHP
2008
 22

    23.   Output
Buffer
 Augusto
Pascutti
‐
ConaPHP
2008
 23

    24.   Não
é
habilitada
por
padrão
no
PHP
   Não
trava
em
strings
mal
formadas
   Maior
número
de
funções
   Mais
rápida
que
a
iconv
 Augusto
Pascutti
‐
ConaPHP
2008
 24

    25.   mb_strlen()
   mb_ereg_*
   mb_str*
   mb_convert_encoding()
   Output
Buffer
 Augusto
Pascutti
‐
ConaPHP
2008
 25

    26.   mb_strlen()
 Augusto
Pascutti
‐
ConaPHP
2008
 26

    27.   mb_substr()
 Augusto
Pascutti
‐
ConaPHP
2008
 27

    28.   Output
Buffer
 Augusto
Pascutti
‐
ConaPHP
2008
 28

    29.   Só
converte
ISO‐8859‐1
para
UTF‐8
!
   Não
trava
em
strings
mal
formadas
 Augusto
Pascutti
‐
ConaPHP
2008
 29

    30. Augusto
Pascutti
‐
ConaPHP
2008
 30

    31.   Sempre
saiba
o
encoding
!
 ▪  Código
 ▪  Banco
de
dados
   Dê
preferência
ao
Unicode
(UTF‐8)
   Cuidado
com
funções
de
string
nativas
 Augusto
Pascutti
‐
ConaPHP
2008
 31

    32.   http://www.php.net
   http://www.phpwact.org/php/i18n/charsets
   http://randomchaos.com/documents/?source=php_and_unicode
 Augusto
Pascutti
‐
ConaPHP
2008
 32

    33. augusto.hp@gmail.com
 www.augustopascutti.com
 Augusto
Pascutti
‐
ConaPHP
2008
 33


    + manuellemosmanuellemos, 2 years ago

    custom

    638 views, 1 favs, 0 embeds more stats

    Palestra dada por Augusto Pascutti no CONAPHP 2008 more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 638
      • 638 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 1
    • Downloads 35
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories