Hi Mitko,
  I did as requested: 
  set http_charset='utf-8'; -- not only at the top of the page but also in the 
procedure
  adapted the rest of the code but the result remained the same.

  Then I commented the 'else' condition to find out which values felt into the 
condition 'isstring'. See file <http://fadyart.com/files/details.vsp>
  The property in question is not included (originalName): 
http://fadyart.com/files/isstring.png
  Although the definition is an XML-string: 
http://fadyart.com/files/originalNameDef.png

  I then tried again to incorporate the cast in the changed circumstances. But, 
as you mentionned, it didn't help neither.

  Anyhow, thanks for the trial !

  Best regards

  Eddy

  PS I might not be able to repond straight this afternoon since I will be off.
    ----- Original Message ----- 
    From: Mitko Iliev 
    To: Eddy Vanderlinden 
    Cc: Hugh Williams ; [email protected] 
    Sent: Tuesday, January 05, 2010 9:54 AM
    Subject: Re: [Virtuoso-users] international characters in vsp pages


    Hi Eddy, 


    You should not cast the result to varchar before to re-code to wide , the 
cast to varchar would try to recode utf-8 to default server narrow charset , 
thus :
    Also you need to set the http charset to utf-8 :


    <?vsp
  set http_charset='utf-8'; -- >>> sets the http charset to utf-8  foreach (any 
row in data) do
        {
  http('<TR>');
  http_value (row[0], 'TD');

--- >>> to be removed   _res1 := sprintf('%V',cast (row[1] as varchar));
  if (isstring (row[1]))   
    http_value(charset_recode(row[1],'UTF-8','_WIDE_'),'TD'); -- >>> recode the 
result to utf-8 to wide if it is a string literal  else     http_value (row[1], 
'TD');    http('</TR>');
        }
?>Best Regards,
    Mitko




    On Jan 4, 2010, at 9:30 PM, Eddy Vanderlinden wrote:


      Hi Hugh,

      After changing the way it is described, it unfortunatelly did not change 
the 
      characters. http://fadyart.com/files/details.vsp

      I will let fall this property since I don't want to bother anybody more 
than 
      I did already.

      Thanks for all the efforts !

      Best regards

      Eddy

      ----- Original Message ----- 
      From: "Hugh Williams" <[email protected]>
      To: "Eddy Vanderlinden" <[email protected]>
      Cc: <[email protected]>
      Sent: Monday, January 04, 2010 6:45 PM
      Subject: Re: [Virtuoso-users] international characters in vsp pages


      HI Eddy,

      The following code is not correct in your VSP page:

      http_value(charset_recode(_res1,'ISO-8859-1','UTF-8'),'TD');

      It should be :

      http_value(charset_recode(_res1,'UTF-8', '_WIDE_'),'TD');

      because the sparql string literals are kept as UTF-8 and http_value needs 
a 
      wide string.

      Also the start of the page should have set http_charset='utf-8';

      Best Regards
      Hugh Williams
      Professional Services
      OpenLink Software
      Web: http://www.openlinksw.com
      Support: http://support.openlinksw.com
      Forums: http://boards.openlinksw.com/support
      Twitter: http://twitter.com/OpenLink

Reply via email to