Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] OT-Japanese in PHP
- Date: Wed, 25 May 2005 16:36:23 +0900
- From: "Erin D. Hughes via info@example.com" <information@example.com>
- Subject: Re: [tlug] OT-Japanese in PHP
- References: <200505220201.j4M21ZnW002503@example.com> <EX-MAIL-SHI-01VDBcs00000108@example.com> <87wtpqsd0b.fsf@example.com> <EX-MAIL-SHI-01OXNHU00000115@example.com> <87u0ktqinc.fsf@example.com> <42940FBF.1070207@example.com>
- User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)
Mark Sargent wrote: > Hi All, > > ok, I recompiled php to support J. Below are my settings, > > output_handler = mb_output_handler > mbstring.language = Japanese > mbstring.internal_encoding = UTF-8 > mbstring.http_input = auto > mbstring.http_output = SJIS > mbstring.encoding_translation = On > mbstring.detect_order = auto > mbstring.substitute_character = none > mbstring.internal_encoding = EUC-JP > > Now, I think I still haven't got the page that requires J, displayed > right, yet. Full code is below. Can anyone see any mistakes..? Cheers. Look in your httpd.conf for something like. #AddDefaultCharset UTF-8 AddDefaultCharset shift_jis AddDefaultCharset EUC If you comment out UTF-8 you should get your charset=Shift-JIS to display correctly. I beleive and some one else can correct me if I am wrong that your settings in httpd.conf override the mb-string just as they override the page settings..... also I do not believe you need mbstring to display Japanese text in php..... could be wrong here as well but I had one server with custom compiled php and no mb-string and it displayed the text fine. However when you tried to use special functions in PHP that called mb-string like formating mail subject lines it would not work. Please re-inform me if you are wrong. E./ > > Mark Sargent. > > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> > <html> > <head> > <meta http-equiv="Content-Type" content="text/html; > charset=Shift-JIS" /> > <title>Jumbo Status-Product Details</title> > </head> > <body lang="ja"> > <hr> > <h1 align="center">JUMBO STATUS</h1><p> > <center>Used Hardware Specialist</center> > <center><a href="index.php">Home</a></center> <center><a > href="search.php">Search</a></center> > <hr> > <table align="center" bgcolor="lightblue" cellpadding="2" border="2" > width="60%"> > <?php > $db = mysql_connect("localhost", "????", "?????"); > if (!$db) { > echo "no connection because " . mysql_error(); > exit; > } > mysql_select_db("status", $db); > if (isset($_REQUEST[product_id])) { > $product_id = $_REQUEST[product_id]; > $result = mysql_query("SELECT Products.product_id, > Products.product_name, Products.product_model_number, > Products.product_price, Products.product_qty, Products.product_desc, > Products.product_data_output, Conditions.condition_detail FROM Products > INNER JOIN Conditions On Products.condition_id = Conditions.condition_id > WHERE Products.product_id = '$product_id'"); > if (!$result) { > echo "Query failed: " . mysql_error(); > exit; > } > $num = mysql_num_rows($result); > $rows = mysql_fetch_array($result); > echo "<tr align=¥"center¥"><td colspan=¥"4¥">Status-Product > Details</td></tr>"; > } > for ($i=0; $i<$num; $i++){ > echo "<tr align=¥"center¥"><td>PRODUCT > NAME</td><td>".$rows['product_name']."</td><br><tr > align=¥"center¥"><td>QUANTITY</td><td>".$rows['product_qty']."</td></tr><br><tr > align=¥"center¥"><td>PRICE</td><td>".$rows['product_price > yen']."</td></tr><br><tr > align=¥"center¥"><td>CONDITION</td><td>".$rows['product_condition']."</td></tr><tr > align=¥"center¥"><td colspan=¥"2¥">MORE DETAILS</td></tr><tr > align=¥"center¥"><td > colspan=¥"2¥">".$rows['product_desc']."</td></tr><tr > align=¥"center¥"><td colspan=¥"2¥">DATA OUTPUT</td></tr><tr > align=¥"center¥"><td colspan=¥"2¥"><font > type=¥"Shift_JIS¥">".$rows['product_data_output']."</font></td></tr>"; > } > ?> > </table> > <p> > <p> > <p> > <hr><center>email: status1@???????<p> > Telephone: ???????<p> > Fax: ???????? > </center> > </body> > </html> >
- Follow-Ups:
- Re: [tlug] OT-Japanese in PHP
- From: Mark Sargent
- References:
- Re: [tlug-digest] Re: [tlug] OT-Japanese in PHP
- From: Jim Breen
- Re: [tlug] OT-Japanese in PHP
- From: Yoshihiro Sato
- Re: [tlug] OT-Japanese in PHP
- From: Stephen J. Turnbull
- Re: [tlug] OT-Japanese in PHP
- From: Yoshihiro Sato
- Re: [tlug] OT-Japanese in PHP
- From: Stephen J. Turnbull
- Re: [tlug] OT-Japanese in PHP
- From: Mark Sargent
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] SuSE 9.1 - 9.3 Upgrade Saga
- Next by Date: Re: [tlug] SuSE 9.1 - 9.3 Upgrade Saga
- Previous by thread: Re: [tlug] OT-Japanese in PHP
- Next by thread: Re: [tlug] OT-Japanese in PHP
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links