hi folks,
when calling a webfrom from an bsp , e.g. des sample forms, than some characters like ä ö etc. are not shown correctly - when switching manually (on the explorer) to encoding UNICODE than they are shown correctly -> we have this problem only with webFroms , are there any suggestions what we made wrong? or how can we avoid that.
kind regards
oliver
Hallo Oliver,
This is going to be slightly complex. I can give you some ideas what to look for. You will have to debug yourself, or will have go via OSS if you need more help.
The problem has to do with two things that must match. One is the call to the response object to set the Content-Type header. The other is the actual content that is set.
For example, is you are running in DE, then set the Content-Type (which also includes the charset) with iso-something. Then write in the content into the response.
It is ultra important that the Content-Type (with charset) must be set before the first byte is written onto the response. Otherwise the kernel will set it for you.
So as first step, BSP will try to set this Content-Type depending on logon language. You can configure this on the properties tab of pages and controllers to set you own. I am not sure if smart forms do anything with the request. And then you might also be setting this header.
Whatever the final value, it must match the data you are going to write. And now comes the next aspect. I suspect SmartForms give you UTF-8 output. If this is true, then you must yourself the Content-Type correctly.
The last aspect is that there was a kernel change to work around some problems here. I can not remember the exact rules, but from what I remember, on Unicode systems, the data is always forced into UTF-8 format.
Maybe this is enough to track down the problem. As a first step use a proxy tool and see what the actual header values are. If you require more help, please open OSS message.
++bcm
Hi,
since kernel patch (I believe)1253 all data written with
append_cdata into the response object will be converted
into the codepage set be char-set in the header field.
The point is that you can display the whole data with or
without conversion. If you call the layout of the BSP
append_cdata will be always executed and the data will be
converted. That's what you don't want. So you must leave the page before the onLayout will be called. This can be
done by navigation->response_complete( ) if you're
working with a page. If you use MVC, just don't call the
view. You can find an example in application IT00 called
Hoping this helps.
Rainer
Hi Oliver,
call it at the end of onInputProcessing. Please also
have a look at the example.
Regards,
Rainer
Hi Oliver,
I should add that as Brian has already mentioned the Smartforms give you the right output. So just use something like:
file = entity->get_data( ).
Do not use get_cdata( ) because this will do the conversion.
At the end (after you got the data) call the
response_complete( ).
This should help.
Rainer
Add a comment