apicurito icon indicating copy to clipboard operation
apicurito copied to clipboard

Character encoding problem

Open samsd21 opened this issue 6 years ago • 5 comments

When I write descriptions with french character, the saved file is correct . But when I re-open it , special characters are not correctly loaded.

example : é becomes é

Maybe an utf-8 reading issue ?

samsd21 avatar Sep 24 '19 14:09 samsd21

I encountered a similar issue when writing emoji in our docs

blake-mealey avatar Oct 18 '20 23:10 blake-mealey

Any update on this issue ?

jeromedemangel avatar Oct 27 '21 09:10 jeromedemangel

Hi @jeromedemangel , I'm looking into the issue now.

jsenko avatar Oct 27 '21 10:10 jsenko

I'm not able to reproduce the issue. What I did:

  1. Created a new OpenAPI schema.
  2. Added an é and 🔥 characters to the description.
  3. Saved the files:
openapi: 3.0.2
info:
    title: New API
    version: 1.0.0
    description: "A brand new API with no content.  Go nuts!\né\né\n\U0001F525"
paths: {}
{
    "openapi": "3.0.2",
    "info": {
        "title": "New API",
        "version": "1.0.0",
        "description": "A brand new API with no content.  Go nuts!\né\né\n🔥"
    },
    "paths": {}
}
  1. Reopened them both in the editor: image Could you provide more detailed steps to reproduce the issue? Possibly providing the saved files that contain the problem. Is the issue occurring if you try it with the Apicurito editor on the master branch? Thanks.

jsenko avatar Oct 27 '21 15:10 jsenko

Example

openapi: 3.0.2
info:
    title: MyAPI
    version: 1.0.0
    description: Hello Jérôme

import this content then export, we obtain

openapi: 3.0.2
info:
    title: MyAPI
    version: 1.0.0
    description: Hello Jérôme

then try to import this new file, Apicurio say

Error Detected! Error parsing OpenAPI file. Perhaps it is not valid YAML?

jeromedemangel avatar Oct 27 '21 16:10 jeromedemangel