cancel
Showing results for 
Search instead for 
Did you mean: 

How to encode japanese characters and URL parameters ?

Former Member
0 Kudos

Hello,

Does anyone has any idea how can I send japanese characters to another application via URL ? Currently its reading displaying garbage on the other end. My source code as follow :

String urlToPDFview = null;

// Generating the URL string and store it into the refLink context.

IWDMessageManager messageMgr = wdComponentAPI.getMessageManager();

String deployableObjectName = wdComponentAPI.getDeployableObjectPart().getDeployableObjectName();

Map urlParameters = new HashMap();

// Prepearing the parameters for Side 1 to be sent over as part of the URL string

urlParameters.put("EmpNameSide1" ,wdContext.currentSide1Element().getEmployeeName());

try

{

WDDeployableObjectPart deployableObjectPart = WDDeployableObject.getDeployableObjectPart(deployableObjectName,

"Previewview",WDDeployableObjectPartType.APPLICATION);

urlToPDFview = WDURLGenerator.getApplicationURL(deployableObjectPart,urlParameters);

}

catch (WDURLException e)

{

messageMgr.reportException(e.getLocalizedMessage(),false);

}

catch (WDDeploymentException ex)

{

messageMgr.reportException(ex.getLocalizedMessage(),false);

}

IWDWindowInfo windowInfo = (IWDWindowInfo) wdThis.wdGetAPI().getComponent().getComponentInfo().findInWindows("App2");

IWDWindow window = wdThis.wdGetAPI().getComponent().getWindowManager().createExternalWindow(urlToPDFview,"test",true);

window.setWindowPosition(300, 150);

window.open();

from

Kwok Wei

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Kwok,

Your code looks ok. Moreover, it correctly delegates any URL parameters encodign to WD runtime.

So it seems that WDURLGenerator fails to escape 2-bytes Unicode characters. Either submit a bug or search for similar SAP notes

VS

Former Member
0 Kudos

Thanks VS. Let me try SAP Notes and will post my findings should I manage to get some answers.

Former Member
0 Kudos

Hello All,

Just to complete me question... the solution that I found was to use URLEncoding and URLDecoding.

from

Kwok Wei

Former Member
0 Kudos

Kwok,

Then definetely submit a bug -- WDURLGenerator <b>must</b> do exactly the same thing internally.

VS