Expand my Community achievements bar.

SOLVED

OSGI Configuration "Default Parameter Encoding" UTF-8

Avatar

Level 2

Hi,

I set the OSGI Configuration "Default Parameter Encoding" in "Apache Sling Request Parameter Handling" to UTF-8 but query string request parameters are still decoded as ISO-Latin-1.

When I set the the additional request parameter "_charset_=UTF-8" it works.

Is there any reason that the OSGI Configuration "Default Parameter Encoding" is not sufficient?

Best regards,

Ronald

1 Accepted Solution

Avatar

Correct answer by
Level 2

The problem is a NullpointerException in the configuration class "RequestParameterSupportConfigurer". One can only avoid this by setting the property "Temporary File Location" to an absolute path. Else the code tries to access a method on

final SlingSettingsService settings = (SlingSettingsService) context.locateService("SlingSettings");

which is null. I created an Issue in the Sling Jira: https://issues.apache.org/jira/browse/SLING-4339

Ronald

View solution in original post

2 Replies

Avatar

Correct answer by
Level 2

The problem is a NullpointerException in the configuration class "RequestParameterSupportConfigurer". One can only avoid this by setting the property "Temporary File Location" to an absolute path. Else the code tries to access a method on

final SlingSettingsService settings = (SlingSettingsService) context.locateService("SlingSettings");

which is null. I created an Issue in the Sling Jira: https://issues.apache.org/jira/browse/SLING-4339

Ronald

Avatar

Level 4

Hi Ronald,

I have setup the "Default Parameter Encoding" in "Apache Sling Request Parameter Handling" to UTF-8 , as shown in below screenshot.

But the encoding is not working.

Could you please tell me how to change this one ?