DeBoerTool / odbc-driver

ODBC Driver for Laravel 5.5+
MIT License
25 stars 11 forks source link

Special characters in the database #11

Closed githubmarquez closed 4 years ago

githubmarquez commented 4 years ago

when there are records with special characters in the database, vowels with accents in Spanish give the following result with error, driver add "b" in from result

+"field1-id": "008" +"field2-name": b"COMPENSACIÓN IMPRENTA"

Example of dd :

array:42 [▼ 0 => {#35173 ▶} 1 => {#35174 ▶} 2 => {#35175 ▶} 3 => {#35176 ▼ +"CodigoFormaPago": "004" +"NombreFormaPago": "PayPal" } 4 => {#35177 ▼ +"CodigoFormaPago": "005" +"NombreFormaPago": "TARJETA TIENDA ONLINE" } 5 => {#35178 ▼ +"CodigoFormaPago": "006" +"NombreFormaPago": "PROVEEDOR" } 6 => {#35179 ▼ +"CodigoFormaPago": "008" +"NombreFormaPago": b"COMPENSACIÓN IMPRENTA" } 7 => {#35180 ▼ +"CodigoFormaPago": "010" +"NombreFormaPago": "DOMICILIADO EN CUENTA" } 8 => {#35181 ▼ +"CodigoFormaPago": "011" +"NombreFormaPago": b"DOMICILIACIÓN 7 DÍAS" }

githubmarquez commented 4 years ago

I fixed it, the problem was ODBC configuration that was not in UTF-8, when in laravel you do a dump, put the prefix +b in the results if it is not in UTF-8, configure the administrative language in windows 10 to UTF-8

Thanks good job