You are here: Articles > Computers & Technology > php

 See more articles about "php "

PHP Tutorials - Tutorial Addendum - Non ASCII Characters as Cord Literals



 31 December 18:00   

    



    



    

(Continued from antecedent part...)

    

3. To access the French character, "e with grave", you can run Alpha >

    

All Programs > Arrangement Accoutrement > Appearance Map. Baddest "e with grave" on the appearance map.

    

Click the Baddest button, then the Archetype button. Go aback to your Block and bang Ctrl-V

    

to adhesive "e wtih grave" into your PHP script.

    

4. Baddest card book > Save as. Access the book name as HelpIsoFrench.php. Baddest "ANSI"

    

in the encoding acreage and bang the Save button. Agenda that ANSI is encoding action authentic by Microsoft

    

and acclimated on Windows system. ANSI contains added characters than ISO-8859-1. But it is accordant with ISO-8859-1.

    

5. Archetype HelpIsoFrench.php to c:inetpubwwwroot. Create abiding your Internet

    

Information Account is active the bounded absence Web site.

    

6. Now run Internet Explorer (IE) with http://localhost/HelpIsoFrench.php.

    

Your should see the French characters displayed accurately as apparent below:

    

 

    

Help

    

English: Arrangement amount is actual high.

    

French: L utilisation de systme est trs haute.

    



    

7. On the IE window, baddest card Appearance > Encoding. You should see "Western European" is selected.

    

Again "Western European" is a altered name for ISO-8859-1.

    

Easy to do, right? We could create it even easier. You can abolish the <meta> tag ambience in

    

HelpIsoFrench.html. French characrters will still appearance up on the IE window. This is because ISO-8859-1

    

is the absence encoding action to IE.

    



    



    

Chinese Characters in Cord Literals - UTF-8 Encoding

    

Now let s play with Chinese characters. They are absolutely harder to plan with than French characters.

    

My first archetype shows you how to handle Chinese characters in PHP scripts with UTF-8 encoding.

    



    

1. On a Windows system, run Alpha > All Programs > Accessories > Notepad.

    

2. In Notepad, access the afterward HTML document:

    

 

    

<?php #HelpUtf8French.php

    

# Absorb (c) 2005 by Dr. Yang, http://www.yang.com/

    

#

    

print( <html> );

    

print( <meta http-equiv="Content-Type" .

    

content="text/html; charset=utf-8"/> );

    

print( <body> );

    

print( <b>??</b><br/> );

    

print( ????????????<br/> );

    

print( </body> );

    

print( </html> );

    

?>

    



    

When I archetype this HTML certificate into this book, I accept to alter all UTF-8 encoded Chinese characters

    

with "?"s, because my book is accounting in HTML certificate with the absence encoding schema. To chase my tutorial,

    

just access any Chinese appearance whenever you see "?".

    

3. As I mentioned beforehand in this book, entering Chinese characters is not an simple job.

    

You charge to use a Chinese Windows system, or a Chinese ascribe apparatus on a non-Chinese Windows system.

    

If you don t accept any Chinese ascribe tool, you can artlessly go to the Beast Chinese Web site, http://www.yahoo.com.cn/,

    

copy some Chinese characters, and adhesive them into Notepad. The Beast Chinese Web website is encoded in UTF-8.

    

4. Baddest card book > Save as. Access the book name as HelpUtf8Chinese.php. Baddest "UTF-8"

    

in the encoding acreage and bang the Save button.

    

5. Archetype HelpUtf8Chinese.php to c:inetpubwwwroot. Create abiding your Internet

    

Information Account is active the bounded absence Web site.

    

6. Now run Internet Explorer (IE) with http://localhost/HelpUtf8Chinese.php.

    

Your should see the Chinese characters displayed correctly.

    

7. On the IE window, baddest card Appearance > Encoding. You should see UTF-8 is selected.

    

(Continued on next part...)

    



    



    



 


 chinese, characters, encoding, select, print, system, french, windows, default, helpisofrench, internet, notepad, click, character, button, string, yahoo, helputf8chinese, document, window, grave, tutorial, schema, literals, , chinese characters, print <, web site, iso 8859, windows system, select menu, click the, helputf8chinese php, html document, string literals, helpisofrench php, encoding schema, menu view encoding, select menu view, window select menu, default encoding schema, < body print, chinese input tool, chinese windows system, characters displayed correctly, php your should, select menu file, non ascii characters, tutorials tutorial notes, menu file save, inetpubwwwroot make sure, internet information service, sure your internet, php tutorials tutorial,

Share PHP Tutorials - Tutorial Addendum - Non ASCII Characters as Cord Literals:
Digg it!   Google Bookmarks   Del.icio.us   Yahoo! MyWeb   Furl  Binklist   Reddit!   Stumble Upon   Technorati   Windows Live   Bookmark

Text link code :
Hyper link code:

Also see ...

PHP Tutorials - Tutorial Addendum - Non ASCII Characters as Cord Literals
i(Continued from antecedent part...)/iChinese Characters in Cord Literals GB2312 EncodingI anticipate we are accessible to analysis Chinese characters in PHP scripts with GB2312 e

PHP Tutorials - Tutorial Addendum - Non ASCII Characters as Cord Literals
i(Continued from antecedent part...)/i3. Don t try to access those accost letters yourself. Go to the Google accent apparatus site,http://www.google.com/language_tools. You can access "Hello world!" and construe it to a

PHP Tutorials - Tutorial Addendum - Non ASCII Characters with MySQL
This affiliate explains:Storing Non ASCII Characters in DatabaseTransmitting Non ASCII Characters to the ServerMySqlUnicode.php UTF 8 Sample Script/ul

PHP Tutorials - Tutorial Addendum - Non ASCII Characters with MySQL
i(Continued from antecedent part...)/iTransmitting Non ASCII Characters to the ServerHandling non ASCII characters with MySQL not alone requires us ambience up the table columns

PHP Tutorials - Tutorial Addendum - Non ASCII Characters with MySQL
i(Continued from antecedent part...)/iIf you run it, you will get: Default settings... character_set_client latin1 character_set_connection latin1 character_set_data

PHP Tutorials - Tutorial Addendum - Administration Non ASCII Characters - Overview
This affiliate explains:What Is Localization / Internationalization?Managing Characters in Web Based Applications Character Traveling PathsASCII Char

PHP Tutorials - Tutorial Addendum - Administration Non ASCII Characters - Overview
i(Continued from antecedent part...)/iCharacter Traveling PathsIn a archetypal Web based application, characters will biking from one allotment of the appliance to addition part. b

PHP Tutorials - Tutorial Addendum - Administration Non ASCII Characters - Overview
i(Continued from antecedent part...)/iASCII Characters in PHP PagesAs I mentioned earlier, ASCII characters can biking from PHP files to browsers easily after any trouble. Ac

PHP Tutorials - Tutorial Addendum - Managing Non ASCII Appearance Strings
This affiliate explains:"mbstring" Extension"mbstring" Functions"mbstring" Basal TestsHTTP Ascribe and Achievement Encodingb

PHP Tutorials - Tutorial Addendum - Managing Non ASCII Appearance Strings
i(Continued from antecedent part...)/i"mbstring" Basal TestsI wrote the afterward Software to analysis some of the "mbstring" basal functions, MbStringBasic.php:p