Skip to Content

Setting Character Set after SP Upgrade

We found a little problem (new feature?) the other day after we applied our latest round of support packages. It relates to some of the examples from my last weblog, /people/thomas.jung3/blog/2004/07/13/bsp-150-a-developer146s-journal-part-vii--dealing-with-multiple-languages-english-german-spanish-thai-and-polish , so I thought I would post the solutin in this forum as well.

We went from Kernel 620 patch 1248 and component 620 SP35 to Kernel 640 patch 27 and component 620 SP42. When we did this the following code examples stopped working:

  me->set_mime_type( `text/html; charset=utf-8` ).
or 
  
  response->set_header_field( name = 'content-type'
                              value = `text/html; charset=utf-8` ).

It appears that now the utf-8 specification must be in all upper case: UTF-8. Once I change the code to the following everything starts working again:

  me->set_mime_type( `text/html; charset=UTF-8` ).
or 
  
  response->set_header_field( name = 'content-type'
                              value = `text/html; charset=UTF-8` ).

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Aug 03, 2004 at 12:23 PM

    Thanks for the heads up Thomas. We're sitting at SP42 as well but not come across this problem.

    Only one problem so far and that is with SP41 one of our BSP's all the images are dead, cache won't load them says that are not valid but we can check them out and edit them... Of course not sure if it's related to the update or not was the only change on the PC before the images were dead??

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 03, 2004 at 08:44 PM

    Thomas,

    There was a change some time ago at kernel level with character encoding. Effectively, if no charset is set, the ICM in kernel will set the charset according to sy-langu on non-unicode systems, and always to utf-8 on unicode systems.

    This charset has to be set always before any character is written into response (cdata call). So configure it for the page, or do the direct response calls.

    The upper case thing is annoying.

    If possible, I would request that you always open OSS tickets for these problems. Then I can route them to the correct group. Given you description I will ask so long, and see what is answer.

    thanks, brian

    Add comment
    10|10000 characters needed characters exceeded