Forum Discussion

oysteigi's avatar
oysteigi
Occasional Contributor
13 years ago

Charset coding problem with project password and Windows

Steps to reproduce:
1. Create new project with a non-ASCII character, for example "Øystein"
2. Set a project password
3. Save the project
4. Reload the project and enter the project password

Expected behaviour: The project still has the name "Øystein" after reload
Actual behaviour: On systems where charset is not UTF-8, the project has changed the name to "?ystein" where the "?" has a diamond shaped background (undisplayable character?)

Looking at the source code, it seems quite obvious what the fix is, as the load()-method in WsdlProject.java expects UTF-8. The saveIn()-method, on the other hand, uses String.getBytes(), which uses the system charset. It should probably have used UTF-8.

I have attached a patch to fix the problem.
  • oysteigi's avatar
    oysteigi
    Occasional Contributor
    This problem should be a pretty trivial to reproduce and fix. Is there a chance for one of the developers to look at it?