Hi Wolfgang

I wonder if it's a TCL issue? For example, I see this discussion has some 
mentions of problems with emojis in some TCL versions 
https://core.tcl-lang.org/tips/doc/trunk/tip/600.md

Brian

________________________________
From: Wolfgang Winkler via naviserver-devel 
<naviserver-devel@lists.sourceforge.net>
Sent: Monday 8 November 2021 11:09
To: naviserver-devel@lists.sourceforge.net 
<naviserver-devel@lists.sourceforge.net>
Cc: Wolfgang Winkler <wolfgang.wink...@digital-concepts.com>
Subject: [naviserver-devel] Issue with certain emojis (unicode/utf-8)


This message's attachments contains at least one web link. This is often used 
for phishing attempts. Please only interact with this attachment if you know 
its source and that the content is safe. If in doubt, confirm the legitimacy 
with the sender by phone.


Dear all!

We face some issues with certain UTF-8 characters, e.g. this one: 
https://emojipedia.org/grinning-face-with-big-eyes/.

When we set "charset" to "utf-8", everything works as expected, except the 
output of various emojis.

set str "Test smiley: 😃<br>öüäÖÄÜß<br>"
ns_return 200 "text/html; charset=unicode" $str; return

returns the smiley correctly, whereas

set str "Test smiley: 😃<br>öüäÖÄÜß<br>"
ns_return 200 "text/html; charset=utf-8" $str; return

returns

Test smiley: ������
öüäÖÄÜß

So I tried to set the charset to "unicode". This works for some files and not 
for others, especially not for javascript files.

This are the parameters in the config section:

ns_section "ns/parameters"
 ....
 #ns_param   HackContentType true
 ns_param   HackContentType false
 ns_param   OutputCharset   $charset
 ns_param   URLCharset      $charset


We also tried with nscp and the tclsh:

nscp Input:

puts "😃"

Log Output:

Notice: nscp:  1: puts "�������"

The nscp telnet client does not return to the prompt.

Tclsh works as expected:

tclsh
% puts "😃"
😃


Tcl version is 8.6.11, naviserver 4.99.22 running on Debian 10.11.

Has anybody encountered and solved a similiar issue?

Thanks,

Wolfgang Winkler

--

Wolfgang Winkler
Geschäftsführung
wolfgang.wink...@digital-concepts.com<mailto:wolfgang.wink...@digital-concepts.com>
mobil +43.699.19971172

dc:büro
digital concepts Novak Winkler OG
Software & Design
Landstraße 68, 5. Stock, 4020 Linz
www.digital-concepts.com<http://www.digital-concepts.com>
tel +43.732.997117.72
tel +43.699.1997117.2

Firmenbuchnummer: 192003h
Firmenbuchgericht: Landesgericht Linz

[https://www.digital-concepts.com/cu/digitalconcepts2016/images/logo_digitalconcepts2016.png]
_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel

Reply via email to