Mantis - Quercus
|
|||||
Viewing Issue Advanced Details | |||||
|
|||||
ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
5308 | minor | always | 12-09-12 18:17 | 01-11-13 14:51 | |
|
|||||
Reporter: | nam | Platform: | |||
Assigned To: | nam | OS: | |||
Priority: | normal | OS Version: | |||
Status: | closed | Product Version: | |||
Product Build: | Resolution: | fixed | |||
Projection: | none | ||||
ETA: | none | Fixed in Version: | 4.0.34 | ||
|
|||||
Summary: | 0005308: QuercusScriptEngine needs to output unicode correctly | ||||
Description: |
(rep by woodle) http://forum.caucho.com/showthread.php?t=29234 [^] |
||||
Steps To Reproduce: | |||||
Additional Information: |
import java.io.StringWriter; import javax.script.ScriptContext; import javax.script.ScriptEngine; import com.caucho.quercus.QuercusEngine; import com.caucho.quercus.script.QuercusScriptEngine; import com.caucho.quercus.script.QuercusScriptEngineFactory; public class TestUtf8 { public static void main(String[] args) throws Exception { QuercusScriptEngineFactory factory = new QuercusScriptEngineFactory(); ScriptEngine phpEngine = factory.getScriptEngine(); ((QuercusScriptEngine) phpEngine).getQuercus().setIni("unicode.semantics", "on"); StringWriter writer = new StringWriter(); ScriptContext context = phpEngine.getContext(); context.setWriter(writer); String code = "<?php print 'Umläut'; return 'Umläut'; ?>"; Object o = phpEngine.eval(code); System.out.println("\n******\n"); System.out.println("code=[" + code + "]"); System.out.println("o=[" + o + "]"); String output = writer.getBuffer().toString(); System.out.println("output=[" + output + "]"); } } |
||||
Relationships | |||||
Attached Files: |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|