microsoft / microsoft/sql-server-samples

Hex x81 value in Sales.Customers

Offen
#428 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
PowerShell
Sterne
11.2k
Forks
9.1k
Ø Merge
2 T. 7 Std.
Gemergte PRs (30 T.)
14

Beschreibung

Using WideWorldImporters-Standard v1.0 table Sales.Customers the value Prabhupāda shows up several times which does not appear to match any encoding I would expect.

Dumping the contents to UTF-8 through PowerShell are more interesting and show xC3 x84 xC2 x81, but the native SQL format shows xC4 x00 x81 x00.

SELECT CustomerName, 
       PostalAddressLine2, 
       WebsiteURL 
FROM   sales.Customers 
WHERE  CustomerName LIKE '%Prabhup%' 
        OR PostalAddressLine2 LIKE '%Prabhup%' 
        OR WebsiteURL LIKE '%Prabhup%' 

Is this intentional? The issue occurs between the Ä and the da, there is a Hex x81 unprintable character which appears in several rows of this table. Just typing this bug report, the  shows as a box, but in the preview it shows as a question mark. Copying/pasting this from SQL Server Managment Studio into Notepad++ shows the character as HOP, which I believe is the same side-effect of the UTF-8 conversion.

Testing against this value can be confusing as it has the tendency to insert whitespace characters, blocks or question marks in its place. A programmer often sees these unmappable characters when there's an encoding error -- common when mixing UTF8 and ANSI -- so it may surface as a false-positive to the naked eye.

Was this deliberate? I've searched everywhere for this text and unicode sequence and the only thing I can determine is that it is a mistake with the underlying data.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne mit der Tabelle Sales.Customers im Beispiel WideWorldImporters-Standard v1.0 und führe die in der Issue gezeigte SQL-Abfrage für die betroffenen Spalten aus. Vergleiche den gespeicherten Wert mit seinen nativen SQL- und PowerShell-UTF-8-Darstellungen. Als erledigt gilt die Aufgabe, wenn festgestellt wurde, ob das Zeichen x81 beabsichtigt ist, und die Beispieldaten korrigiert wurden, falls es fehlerhaft ist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
powershell, sql
Bereich
databases
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.