Skip to content

OSM name tag encoding #369

Open
Open

Description

@AAnderl

Helllo,

I am experiencing the same isuue as described here: #39

Bug seems to be closed since 2015 so probably I am doing something wrong (I'm new to Qgis).

Encoding

2021-12-01T14:35:47     INFO    Query: natural_water
2021-12-01T14:35:47     INFO    Encoded URL: https://lz4.overpass-api.de/api/interpreter?data=[out:xml] [timeout:25];%0A(%0A node[%22natural%22%3D%22water%22]( 42.31961,-8.00794,43.76536,-6.78239);%0A way[%22natural%22%3D%22water%22]( 42.31961,-8.00794,43.76536,-6.78239);%0A relation[%22natural%22%3D%22water%22]( 42.31961,-8.00794,43.76536,-6.78239);%0A);%0A(._;%3E;);%0Aout body;&info=QgisQuickOSMPlugin
2021-12-01T14:35:53     INFO    Request completed
2021-12-01T14:35:53     INFO    Checking OSM file content C:/Users//AppData/Local/Temp/request-IVhQgc.osm
2021-12-01T14:35:53     INFO    The OSM file is: C:/Users//AppData/Local/Temp/request-IVhQgc.osm
2021-12-01T14:35:54     INFO    Fixing geometries in layer: multipolygons
2021-12-01T14:35:54     INFO    The OSM parser took: 00h 00m 01s
2021-12-01T16:08:57     INFO    All OSM objects with the key 'natural'='water' in la extensión del lienzo o capa are going to be downloaded.

Environment

  • QuickOSM version: 3.18.3
  • QGIS version: 2.0.0
  • OS: Windows 10

Thanks in advance

Activity

  1. added
    bug
    on Dec 1, 2021
  2. Technofinchen commented on Feb 21, 2022

    @Technofinchen

    Hi there,
    Seems the bug has been fixed for point geometries but still persists for the other geometries.

    Environment

    QuickOSM version: 2.0.1
    QGIS version: 3.16
    OS: Windows 10
    
  3. Gustry commented on Feb 22, 2022

    @Gustry
    Collaborator

    Can you send an OSM file ? (in this ticket, drag and drop) I can't replicate, I guess.

    I doubt there is a difference between geometry types. The process is the same.

  4. Technofinchen commented on Feb 22, 2022

    @Technofinchen

    Hi there,
    Strangely, I can't reproduce it either, at least not all of it. Seems to be more complicated. I composed the query using the Quick Query feature. Yesterday it gave me bad character encodings in the "Name" column, today I reassembled it, it's ok. The funny thing is that I haven't even closed Qgis since yesterday. Today's result also has fewer columns. Also funny, when I run yesterday's saved query today, it gives me broken character encodings again. I used the same parameters yesterday to compose the query as I did today. There is a difference I can see as parts of today's query description are translated. Pretty weird.

    grafik

  5. SergioAN007 commented on Mar 6, 2022

    @SergioAN007

    Just save data layer encoded windows-1251. After save in layer properties set encoding UTF-8

  6. royas commented on Mar 8, 2022

    @royas

    I've had similar problem while using quickosm algorithms inside model. Adding "set layer encoding" after "string concatenation" fixed the problem.
    image

  7. AAnderl commented on Mar 9, 2022

    @AAnderl
    Author

    Hello,

    Thanks for the answers. Apologies for the delay in responding.

    Attached fresh file, downloaded today.

    NaturalWater.zip

  8. AAnderl commented on Mar 9, 2022

    @AAnderl
    Author

    I've had similar problem while using quickosm algorithms inside model. Adding "set layer encoding" after "string concatenation" fixed the problem. image

    Royas, Thanks but unfortunately I'm not at that level. I don't know what all that beautiful stuff is.

    Best regards

  9. AAnderl commented on Mar 9, 2022

    @AAnderl
    Author

    Just save data layer encoded windows-1251. After save in layer properties set encoding UTF-8

    I've tried and it's worse than before. Thank you anyway.

  10. SergioAN007 commented on Mar 11, 2022

    @SergioAN007

    Thats resolve problem with encoding in last version QuickOSM:

    1. Genarete request using QuickOSM
      1 GenRequest

    2. Result request
      2 ResultRequest

    3. Save as usually result (Export layer-UTf8-save)
      3 Save as usually (Export layer-UTf8-save)

    4. Solve problem. Save layer in 1251 encode. (Export layer-windows-1251-save)
      4 Solve problem (Export layer-windows-1251-save)

    5. Next in layer properties set UTF8
      5 Solve problem (in layer properties set UTF8)

    6. Result
      6 Result

  11. AAnderl commented on Mar 11, 2022

    @AAnderl
    Author

    Thats resolve problem with encoding in last version QuickOSM:

    1. Genarete request using QuickOSM
       ![1 GenRequest](https://user-images.githubusercontent.com/25266691/157786080-6ae10676-1dd2-4a09-964f-15cff3fc2fb7.png)
    
    2. Result request
       ![2 ResultRequest](https://user-images.githubusercontent.com/25266691/157786251-6f500c5b-0a0b-40e8-b1e9-3e7396ac4141.png)
    
    3. Save as usually result (Export layer-UTf8-save)
       ![3 Save as usually (Export layer-UTf8-save)](https://user-images.githubusercontent.com/25266691/157786340-b86a2082-7bfe-41ff-b494-1f65cc5ee75d.png)
    
    4. Solve problem. Save layer in 1251 encode. (Export layer-windows-1251-save)
       ![4 Solve problem (Export layer-windows-1251-save)](https://user-images.githubusercontent.com/25266691/157786514-b9329998-d0d9-49ae-a4ad-1ed5f6890bb8.png)
    
    5. Next in layer properties set UTF8
       ![5 Solve problem (in layer properties set UTF8)](https://user-images.githubusercontent.com/25266691/157786747-2c5a0d72-ceab-40e0-8b6d-3e89293c2b59.png)
    
    6. Result
       ![6 Result](https://user-images.githubusercontent.com/25266691/157786771-d03c2d02-368f-4c13-9665-d20d3251a601.png)
    

    I really appreciate your efforts to help me, but it doesn't work

  12. Mika97400 commented on Apr 19, 2022

    @Mika97400

    Hello,
    I get the same problem on windows 11 but not on windows 10. I don't know if it's related but it looks like it depends on system environment.
    To get it work I choose Shapefile format to export data instead of geopackage (directly in QuickOSM UI in advanced) and then when I set to UTF-8 encoding in the layer properties of the layer it works.
    Be careful, use Shapefile will truncate fields name so you should take it into account on the rest of your workflow.

    The bug is no more present in QGIS 3.24 Tisler!

  13. AAnderl commented on Apr 22, 2022

    @AAnderl
    Author

    Hello, I get the same problem on windows 11 but not on windows 10. I don't know if it's related but it looks like it depends on system environment. To get it work I choose Shapefile format to export data instead of geopackage (directly in QuickOSM UI in advanced) and then when I set to UTF-8 encoding in the layer properties of the layer it works. Be careful, use Shapefile will truncate fields name so you should take it into account on the rest of your workflow.

    The bug is no more present in QGIS 3.24 Tisler!

    Hello. Thanks for renponding. I did it always this way and problem persist. And I use 3.24.0 since it was launched. (Win 10)

  14. aflexus commented on Apr 22, 2022

    @aflexus

    This bug is still present in the last QGIS versions (3.24.0, 3.24.1, 3.24.2) and the latest QuickOSM.

    I've researched the issue a little and found out that:

    • issue happens on windows machines only;
    • all the resulting osm-files always have the correct encoding - UTF-8 (at least in all my cases). But by an unknown reason QGIS interprets and opens some of them with ANSI encoding (and some of them with correct UTF-8, of course).

    I really do not know if the developer of QuickOSM could force QGIS to open all the generated osm-files with UTF-8 encoding only. If no then it seems that we have to make a ticket for QGIS developers

    Regards

  15. AAnderl commented on Apr 25, 2022

    @AAnderl
    Author

    This bug is still present in the last QGIS versions (3.24.0, 3.24.1, 3.24.2) and the latest QuickOSM.

    I've researched the issue a little and found out that:

    * issue happens on windows machines only;
    
    * all the resulting osm-files always have the correct encoding - UTF-8 (at least in all my cases). But by an unknown reason QGIS interprets and opens some of them with ANSI encoding (and some of them with correct UTF-8, of course).
    

    I really do not know if the developer of QuickOSM could force QGIS to open all the generated osm-files with UTF-8 encoding only. If no then it seems that we have to make a ticket for QGIS developers

    Regards

    Thanks for your comment and for pulling the request in Qgis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions