{"id":4247,"date":"2017-11-18T19:06:33","date_gmt":"2017-11-18T19:06:33","guid":{"rendered":"https:\/\/www.use-snip.com\/kb\/?post_type=ht_kb&#038;p=4247"},"modified":"2018-11-09T12:11:22","modified_gmt":"2018-11-09T12:11:22","slug":"non-ascii-used-caster-table","status":"publish","type":"ht_kb","link":"https:\/\/www.use-snip.com\/kb\/knowledge-base\/non-ascii-used-caster-table\/","title":{"rendered":"Non-ASCII used in Caster Table"},"content":{"rendered":"<p>A minor bug is the way <span style=\"color: #0000ff;\"><strong>SNIP<\/strong><\/span> creates the Caster Table header when using non-Latin fonts has been discovered and is now corrected.\u00a0 We have had no reports of this issue causing end user connection problems.\u00a0 The patch is present in <span style=\"color: #0000ff;\"><strong>SNIP<\/strong><\/span> release 1.11.7 and thereafter (production release 1.12 on-wards).<\/p>\n<h3>Background<\/h3>\n<p>As a general rule <span style=\"color: #0000ff;\"><strong>SNIP<\/strong> <\/span>will use the machines local language and conventions to represent numbers, dates, times, and other textual objects.\u00a0 So a user in France sees <em>french<\/em> and one in Japan sees <em>Japanese<\/em> and in the correct local font.\u00a0 Because <span style=\"color: #0000ff;\"><strong>SNIP<\/strong> <\/span>represents strings in UTF8, that works fine for languages that use the &#8220;Latin&#8221; font and it also works transparently for most of the world other fonts including Kanji, Cyrillic , Greece, Simplified Cheese, etc.<\/p>\n<p>The problem occurs when a the Caster Table is created.\u00a0 Every time this table is requested, the current UTC time stamp is used (and also the build date of the <span style=\"color: #0000ff;\"><strong>SNIP<\/strong><\/span> release).\u00a0\u00a0 Here is a typical example showing the issue taken from a <span style=\"color: #0000ff;\"><strong>SNIP<\/strong><\/span> deployment located in Asia (some detail obscured for privacy):<\/p>\n<pre style=\"padding-left: 30px;\">SOURCETABLE 200 OK\r\nServer: SubCarrier Systems Corp SNIP simpleNTRIP_Caster_R1.10.0\/of:\u4e03\u6708 11 2017\r\nDate: \u9031\u4e94, 17 \u5341\u4e00\u6708 2017 11:57:03 UTC\r\nContent-Type: text\/plain\r\nContent-Length: 257\r\n\r\nSTR;PLxxx_5700_Ba;Penghu;RTCM 3;1004(1),1005(10),1007(10);2;GPS;SNIP;TWN;2x.57;1x9.5x;0;0;sNTRIP;;;;1150;;\r\nSTR;PLxxx_RTK;Penghu;RTCM 3;1004(1),1006(10),1007(10),1013(10);2;GPS;SNIP;TWN;2x.57;1x9.5x;0;0;sNTRIP;;;;1237;;\r\nNET;SNIP;;;;;220.1.xxx.xxx:81;;;\r\nENDSOURCETABLE<\/pre>\n<p>The above table follows the RTCM <a href=\"https:\/\/www.use-snip.com\/kb\/knowledge-base\/question-what-is-an-ntrip\/\">NTRIP protocol<\/a> recommendations (where in fact the time line is not required).\u00a0 But is does not follow the general guidelines of HTML.\u00a0 Here are two (of the three) conflicting lines:<\/p>\n<pre style=\"padding-left: 30px;\">Date: \u9031\u4e94, 17 \u5341\u4e00\u6708 2017 11:57:03 UTC\r\nContent-Type: text\/plain<\/pre>\n<p>The first line is not plain text.\u00a0 And &#8220;plain text&#8221; in is case is taken to mean &#8220;<span class=\"_Tgc\">us-ascii<\/span>&#8221; as noted by:<\/p>\n<p style=\"padding-left: 30px;\"><span class=\"_Tgc\">7.1 The <b>Text Content<\/b>&#8211;<b>Type<\/b>. &#8230; A &#8220;charset&#8221; parameter may be used to <b>indicate<\/b> the character set of the body <b>text<\/b>. The primary subtype of <b>text<\/b> is &#8220;<b>plain<\/b>&#8220;. This indicates <b>plain<\/b> (unformatted) <b>text<\/b>. The default <b>Content<\/b>&#8211;<b>Type<\/b> for Internet mail is &#8220;<b>text<\/b>\/<b>plain<\/b>; charset=us-ascii&#8221;.<\/span><\/p>\n<p>So we could try to express the time in other ways&#8230;<\/p>\n<p style=\"padding-left: 30px;\">Date: \u9031\u4e94, 17 \u5341\u4e00\u6708 2017 11:57:03 UTC\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 might be expressed as:<br \/>\nD\u0113ta: Sh\u016b go, 17 11gatsu 2017 11: 57: 03 UTC\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0 \u00a0 or as:<br \/>\n<span lang=\"en\">Date: Week 5, 17 November 2017 11: 57: 03 UTC\u00a0\u00a0\u00a0\u00a0 \u00a0 \u00a0 \u00a0 (which is all ASCII)<br \/>\n<\/span><\/p>\n<p>But the html plain-text rule means we need to stick with ASCII.\u00a0 So the various diacritical and accent marks found in the above (the \u016b in Sh\u016b) and also in most European languages using the Latin1 font, are <em>also<\/em> prohibited here.\u00a0\u00a0 [<em>Aside<\/em>: One of the primary reasons that the NTRIP protocol uses only ASCII is to\u00a0 support having &#8216;dumb&#8217; <a href=\"https:\/\/www.use-snip.com\/kb\/knowledge-base\/question-what-is-an-ntrip-client\/\">NTRIP Clients<\/a> to be able to parse the table, so these characters are also not allowed in the mountPt names]<\/p>\n<p>So we have added some additional code to ensure that regardless of what local language the machine running <span style=\"color: #0000ff;\"><strong>SNIP<\/strong><\/span> is set to, the two instances of time in the header will be expressed in 8-bit ASCII characters only.<\/p>\n<p style=\"text-align: right;\"><em>To repeat:\u00a0<\/em> We have had no reports of this issue actually<br \/>\ncausing any end user connection problems at this time.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A minor bug is the way SNIP creates the Caster Table header when using non-Latin fonts has been discovered and is now corrected.\u00a0 We have had no reports of this issue causing end user connection problems.\u00a0 The patch is present in SNIP release 1.11.7 and thereafter (production release 1.12 on-wards). [&hellip;]<\/p>\n","protected":false},"author":13,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"ht-kb-category":[286],"ht-kb-tag":[224],"class_list":["post-4247","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-release-history","ht_kb_tag-caster-table"],"_links":{"self":[{"href":"https:\/\/www.use-snip.com\/kb\/wp-json\/wp\/v2\/ht-kb\/4247","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.use-snip.com\/kb\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/www.use-snip.com\/kb\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.use-snip.com\/kb\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/www.use-snip.com\/kb\/wp-json\/wp\/v2\/comments?post=4247"}],"version-history":[{"count":10,"href":"https:\/\/www.use-snip.com\/kb\/wp-json\/wp\/v2\/ht-kb\/4247\/revisions"}],"predecessor-version":[{"id":4257,"href":"https:\/\/www.use-snip.com\/kb\/wp-json\/wp\/v2\/ht-kb\/4247\/revisions\/4257"}],"wp:attachment":[{"href":"https:\/\/www.use-snip.com\/kb\/wp-json\/wp\/v2\/media?parent=4247"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.use-snip.com\/kb\/wp-json\/wp\/v2\/ht-kb-category?post=4247"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.use-snip.com\/kb\/wp-json\/wp\/v2\/ht-kb-tag?post=4247"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}