| Anonymous | Login | Signup for a new account | 06-10-2026 07:22 PDT |
| Main | My View | View Issues | Change Log | Docs |
| Viewing Issue Advanced Details [ Jump to Notes ] | [ View Simple ] [ Issue History ] [ Print ] | ||||||||
| ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
| 0004798 | [Resin] | minor | always | 10-12-11 14:50 | 06-20-12 10:52 | ||||
| Reporter | alex | View Status | public | ||||||
| Assigned To | ferg | ||||||||
| Priority | normal | Resolution | unable to reproduce | Platform | |||||
| Status | closed | OS | |||||||
| Projection | none | OS Version | |||||||
| ETA | none | Fixed in Version | 4.0.29 | Product Version | |||||
| Product Build | |||||||||
| Summary | 0004798: Japanese characters: java + php | ||||||||
| Description |
Even if characters set is "UTF-8" in "Quercus" setting and the other environments ,characters in Java String are garbling. For Example... Java class : 1 public class TestClass { 2 3 public static String TestString() { 4 return "&12354;&12356;&12358;&12360;&12362;"; 5 } 6 7 public static String toByteString(Object o) { 8 byte[] b = o.toString().getBytes(); 9 StringBuilder bs = new StringBuilder(); 10 String hex; 11 for (int i = 0; i < b.length; i++) { 12 hex = Integer.toHexString(b[i]); 13 bs.append(hex.substring(hex.length() - 2)); 14 } 15 return bs.toString(); 16 } 17 } |
||||||||
| Steps To Reproduce | |||||||||
| Additional Information |
PHP 1 <?php 2 // Garbling would happen 3 $testStr = TestClass::TestString(); 4 echo $testStr; 5 ?> 6 7 <hr/> 8 9 <?php 10 // Convert Byte String 11 $val = TestClass::toByteString($testStr); 12 echo $val; 13 ?> 14 15 <hr/> 16 17 <?php 18 // pack 19 echo pack("H*", $val); 20 ?> Result (HTML) 1 BDFHJ 2 <hr/> 3 4 e38182e38184e38186e38188e3818a 5 <hr/> 6 7 &12354;&12356;&12358;&12360;&12362; So, Line 1 is unexpected characters, we extected "&12354;&12356;&12358;&12360;&12362;". |
||||||||
| Attached Files | |||||||||
|
|
|||||||||
| Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
36 total queries executed. 32 unique queries executed. |