| Summary: | 'Change Value' handles multibyte-string with improper encoding | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Toshihiro Izumi <euthanasia_waltz> |
| Component: | PDT | Assignee: | Shalom Gibly <shalom> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P2 | Keywords: | plan |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
Assigned for further investigation Well, 'Change Value' walks
PHPVariabe#setValue
->DefaultExpressionsManager#assignValue
->RemoteDebugger#assignValue
->DebugConnectionThread#sendRequest
->AssignValueRequest#serialize
=>convert encoding with fEncoding but fEncoding is *null*
This is my TEST code in RemoteDebugger.java. (It will not be an appropriate module.)
[code]
public boolean assignValue(String var, String value, int depth, String[] path) {
if (!this.isActive()) {
return false;
}
AssignValueRequest request = new AssignValueRequest();
request.setVar(var);
request.setValue(value);
request.setDepth(depth);
request.setPath(path);
//XXX-
try {
String enc = debugHandler.getDebugTarget().getLaunch().getLaunchConfiguration().getAttribute(IDebugParametersKeys.TRANSFER_ENCODING, "");
request.setTransferEncoding(enc);
} catch (CoreException e) {
e.printStackTrace();
}
//-XXX
try {
connection.sendRequest(request);
return true;
} catch (Exception exc) {
exc.printStackTrace();
}
return false;
}
[/code]
This works. I can change value with multibyte-string.
It is necessary to set encoding...somewhere.
Fixed. Set the AssignValueRequest transfer encoding to the debug transfer encoding that is set in the preferences. fixed |
'Change Value' handles multibyte-string with improper encoding. In Variables View, viewing variables is OK. It seems to obey 'Debug Transfer Encoding'. However, if I open 'Change Value' and simply click OK button, then multibyte-characters will be broken. If I enter 'mb_convert_encoding("...", mb_internal_encoding(), "Windows-31J")' as value, it's OK, I can see correct characters. (Windows-31J is the system default encoding of my pc) Proper conversion should be applied in changing value.