Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Incorrect export of CSV

Discussion in 'Localization Tools' started by Ryan_Konsonautic, Aug 1, 2023.

  1. Ryan_Konsonautic

    Ryan_Konsonautic

    Joined:
    Dec 13, 2019
    Posts:
    3
    Hey,
    we are currently using the localisation system. When I create a CSV file to insert the English translation, I get an incorrect CSV file that outputs different values.

    Inverted commas are sometimes missing, breaks are created where there are none. This means that I cannot import a CSV file without completely revising the file created.

    I can't find a way to fix this error except to adjust everything manually. But that costs me more time than copy-pasting the translation.



     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,845
    I'm not sure why it would do that. Are you using the latest version 1.4.4? If it's not visible in the package manager you can edit the manifest.json file in the packages folder.

    If that doesn't work then could you please share the project or an example one so I can try and reproduce the issue?
     
  3. Ryan_Konsonautic

    Ryan_Konsonautic

    Joined:
    Dec 13, 2019
    Posts:
    3
    I'm at UnityVersion 2022.3.1f. but I can't update the Localization Package above 1.3.2.
    We are close to the GamesCom and I don't want to change to another UnityVersion for the whole team. :oops:

    But actually I should get the update displayed, right?
     
  4. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,845
    It depends on the package manager. It doesnt always show the latest patch version even though its supported. You can update by changing the manifest.json file in your projects Packages folder. Change the localization package version to 1.4.4 in the manifest and it will trigger an update.
     
  5. Ryan_Konsonautic

    Ryan_Konsonautic

    Joined:
    Dec 13, 2019
    Posts:
    3
    Ok, I have made an update and recreated the tables. In the process, I found a strange bug. The omission of inverted commas in the CSV file ONLY happens when I copy-paste from an Excel file. If I enter the values by hand, the values are separated correctly.
    The wrapping of values where there is actually no wrapping still happens. My colleague may also have used copy paste in the German language. However, I can no longer verify this.

     
  6. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,845
  7. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,845
    Hi,
    I got your bug report through today. QA will also respond.
    From what I can see this seems to be more of an issue with Excel. If you copy and paste from Excel into Unity(or another application) it will include a carriage return (\r) at the end of the text.
    You can see them in the asset file:

    image.png

    When you then export the csv it also includes the carriage return. Most applications will create line breaks in the file:

    image (1).png

    These line breaks seem to break the import of the CSV into Excel, however, this seems to be based on the version of Excel, or perhaps a setting.

    Our QA was using Excel 2016 MSO (16.0.4456.1003) and they also had the import issues:

    image (2).png

    However, I was using Microsoft® Excel® for Microsoft 365 MSO (Version 2309 Build 16.0.16827.20130) 64-bit and had no issues importing the file
    upload_2023-10-6_10-41-9.png

    So there's not really anything we can do from our side. The hidden characters are annoying but sometimes necessary. It would be nice to know what the magic setting is to get Excel to import the file correctly, it may just be something that's solved by updating to the latest patch of Excel.
    Have I missed anything here?