<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>BLE device local name parsing</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/59381/ble-device-local-name-parsing</link><description>I have a BLE device for which the local name contains and apostrophe. When I run nRF Connect on an Android phone and view the raw data for this device I find the apostrophe is represented by the following three hex bytes: 0x80 0x99 0x73. I am developing</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 25 Mar 2020 07:27:10 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/59381/ble-device-local-name-parsing" /><item><title>RE: BLE device local name parsing</title><link>https://devzone.nordicsemi.com/thread/241503?ContentTypeID=1</link><pubDate>Wed, 25 Mar 2020 07:27:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0fd2001e-6fa2-41de-a736-42f8b07335f5</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;No problem at all, I am happy to help!&lt;br /&gt;&lt;br /&gt;The general case is purely ascii, it is only when the input contains non-ascii characters that other encodings have to be utilized.&lt;br /&gt;In your case, you can avoid this by sticking to only ascii characters - replacing the right single quotation mark with a 0x27 &amp;#39; apostrophe.&lt;br /&gt;Perhaps your keyboard is configured to a national layout that contains more non-ascii characters? That could be something to look into.&lt;br /&gt;I would recommend sticking to only ascii characters if possible for minimal byte usage and simplicity.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE device local name parsing</title><link>https://devzone.nordicsemi.com/thread/241427?ContentTypeID=1</link><pubDate>Tue, 24 Mar 2020 15:52:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a57f3196-bde9-4b86-aafd-db727b28bd74</guid><dc:creator>Stroker347</dc:creator><description>&lt;p&gt;Thanks so much for your reply. I never considered that the advertised name might be encoded as other than Ascii. Do you know if UTF-8 is commonly used in Bluetooth string data encoding?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE device local name parsing</title><link>https://devzone.nordicsemi.com/thread/241414?ContentTypeID=1</link><pubDate>Tue, 24 Mar 2020 14:52:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e7441b0d-1184-49ff-ae9e-70892f54fadc</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;I am unable to reproduce this on my end - when inputting a &amp;#39; it is written as 0x27 in the raw data, as can be seen in the attached screendump. I tested this with nRF Connect as well, with the same result. Therefore, I strongly suspect that the inputted character is in fact not an apostrophe.&lt;br /&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-02cfa9a6cc934fcab75ac25fe6528572/reprodAph.PNG" /&gt;&lt;br /&gt;&lt;br /&gt;Upon further investigation, your inputted character - 0xE2 0x80 0x99 - is in fact a&amp;nbsp;UTF-8&amp;nbsp;&lt;em&gt;right single quotation mark .&lt;br /&gt;&lt;/em&gt;This explains why it is rendered similar to an apostrophe, while it is not.&lt;br /&gt;&lt;br /&gt;If you run into similar problems in the future, I recommend looking them up in a unicode lookup table for the fastest possible resolve.&lt;br /&gt;&lt;br /&gt;Let me know if you should have any other questions! :)&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE device local name parsing</title><link>https://devzone.nordicsemi.com/thread/241228?ContentTypeID=1</link><pubDate>Mon, 23 Mar 2020 18:18:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5e276f12-dcc7-473a-94a7-6f6d20b4a2d9</guid><dc:creator>Stroker347</dc:creator><description>&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/Screenshot_5F00_20200323_2D00_125104_5F00_nRF-Connect.jpg" /&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/Screenshot_5F00_20200323_2D00_121925_5F00_nRF-Connect.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;As you can see from the nRF Connect images above there is a device &amp;quot;Maggie&amp;#39;s Room&amp;quot; for which the Raw Data in the first line has the hex bytes &amp;quot;0xe2 0x80 0x99&amp;quot; in between the &amp;#39;e&amp;#39; (ox65) and the &amp;#39;s&amp;#39; (0x73) where the apostrophe is. The hex value for an Ascii apostrophe is 0x27 and is only one byte. In my code I retrieve the same raw data but the apostrophe gets displayed as three extended Ascii characters that look like garbage in the output. So my question is how do those three bytes get interpreted and properly displayed as an apostrophe in your nRF Connect code?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE device local name parsing</title><link>https://devzone.nordicsemi.com/thread/241216?ContentTypeID=1</link><pubDate>Mon, 23 Mar 2020 17:03:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:51ec9f5b-3483-4e4a-95be-e26705adfb21</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;That sounds weird, and would be something I too would be curious about.&lt;br /&gt;Could you please provide me a more exact description of the issue - with a screenshot of the &amp;quot;raw data for this device&amp;quot; and the scan report data, along with the device name in question?&lt;br /&gt;Initially I would think that this is the result of the inputted apostrophe not actually being a regular apostrophe - but rather a very similar looking non-ascii character. Could this at all be possible?&lt;br /&gt;&lt;br /&gt;I am looking forward to getting to the bottom of this,&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>