encoding csv to windows-1252 does not work

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

encoding csv to windows-1252 does not work

Reginald
Hi users and devs,

I used 'import text separated layer' in the menu 'Add layer' from 'Layers'
menuitem to add a txt file.
<http://osgeo-org.1560.x6.nabble.com/file/t376957/information_layer.png>

The text files are in Windows 1252 encoding. When importing them I chose
this encoding but as you can see from the screenshot it shows an encoding of
utf-8. When I import this layer in a Windows 1252 encoded database on
Postgresql I get no french characters.
Is this a bug?
Any idea how to get this text files imported in postgresql so that french
characters are shown?

Regards,



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: encoding csv to windows-1252 does not work

Tobias Wendorff
Hi there,

> The text files are in Windows 1252 encoding. When importing them I
> chose this encoding but as you can see from the screenshot it shows
> an encoding of utf-8.

Which version of QGIS are you using? With stable and master QGIS3,
I cannot reproduce it with the file attached. Be aware that it gets
UTF-8 once imported to QGIS. So it'll be UTF-8 in the table, too.

[local] tobwen@qgis=# select * from public.french
&#9484;&#9472;&#9472;&#9472;&#9472;&#9516;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9488;
&#9474; id &#9474;              quote               &#9474;
&#9500;&#9472;&#9472;&#9472;&#9472;&#9532;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9508;
&#9474; 1  &#9474; L’habit ne fait pas le moine     &#9474;
&#9474; 2  &#9474; Chacun voit midi à sa porte      &#9474;
&#9474; 3  &#9474; “Mieux vaut prévenir que guérir” &#9474;
&#9492;&#9472;&#9472;&#9472;&#9472;&#9524;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9496;

Best regards,
Tobias
_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

french.csv (154 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: encoding csv to windows-1252 does not work

Reginald
Hi Tobias,

If I understand you correctly the table in QGIS is in utf-8.
When I open the table I see that the french characters show up correct.
In stead of setting my database to 1252 West-Europees Windows I should set
it up in utf-8.
I created a test database from pgadmin and the defaults where alright.
Now I see the correct characters in my table.

Thanks a lot!

Regards,




--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user