cancel
Showing results for 
Search instead for 
Did you mean: 

FileDownLoad UI element - MultiLanguage

Former Member
0 Kudos

Hi,

I use Filedownload UI element, created the resource as below

IWDResource resource = WDResourceFactory.createResource(fileContent.getBytes(),"Test.XLS",WDWebResourceType.XLS);

Problem: When the values in the report are of German & other languages, in excel sheet (output) the special characters which are not in english like häl should be display as it is , but some grabage values are displayed instead of that characters.

I.e excel is not displaying the special characters, but as per the requirement i want to display the values as it is in the attributes of nodes.

do i need to set ("UTF-8"), if so were?

Thanks

Maha

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Maha,

Below is the code you can use to change String to UTF8 format and then changing back to string.

this you can use to solve your problem.

try {
        // Convert from Unicode to UTF-8
        String string = "abc\u5639\u563b";
        byte[] utf8 = string.getBytes("UTF-8");
    
        // Convert from UTF-8 to Unicode
        string = new String(utf8, "UTF-8");
    } catch (UnsupportedEncodingException e) {
    }

Regards

Narendra

Answers (0)