microsoft / microsoft/sql-server-samples
Hex x81 value in Sales.Customers
Nessuno ha ancora preso questa issue.
- Lingua principale
- PowerShell
- Stelle
- 11.2k
- Fork
- 9.1k
- Merge medio
- 2g 7h
- PR unite (30g)
- 14
Descrizione
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.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia con la tabella Sales.Customers dell'esempio WideWorldImporters-Standard v1.0 ed esegui la query SQL mostrata nell'issue sulle colonne interessate. Confronta il valore memorizzato con le sue rappresentazioni UTF-8 native di SQL e PowerShell. Il lavoro è completato quando è stato determinato se il carattere x81 è intenzionale e, se è errato, sono stati corretti i dati di esempio.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- powershell, sql
- Ambito
- databases
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100