npedidos / rest-api

NPedidos es una aplicación que permite la gestión simple de pedidos de menús de comidas, por fechas.
MIT License
8 stars 16 forks source link

Added Encoding type #15

Closed chinmaym07 closed 1 year ago

chinmaym07 commented 1 year ago

fixes: #2

nmarulo commented 1 year ago

image

The characters are still displayed incorrectly. Please, you can check it. Before making any further changes, please update your master branch.

nmarulo commented 1 year ago

@chinmaym07 please confirm if you are still interested in working on this assignment, thank you.

chinmaym07 commented 1 year ago

Yes @nmarulo I am working on this pr.

chinmaym07 commented 1 year ago

Hi @nmarulo I tried most of the approaches. but couldn't get this resolved. can you please help ?

nmarulo commented 1 year ago

@chinmaym07

The problem here, is that the pom.xml file is encoded in utf-8 and the properties files in iso-8859-1.

I can think of some solutions (if you have already tried them tell me what solutions you have tried):

One solution (possibly the most correct one) is to change the properties files to yaml files.

Another solution could be: in the AppProperties class, implement the getter methods of the conflicting properties and get the bytes in the correct encoding and return a new String (although this would be a temporary solution). EJ: new String(appProperties.getAppDescription().getBytes(StandardCharsets.ISO_8859_1));

At the moment I can only think of this, I would have to investigate further.

nmarulo commented 1 year ago

If you find it complicated, don't worry, I'll look into it later.

chinmaym07 commented 1 year ago

You are right @nmarulo . I tried solution like except the yaml one.

  1. Forcing encoding type
  2. Creating Custom Resource builder.
  3. EJ which you mentioned but with incorrect encoding type.

Should I update the PR with yaml file change or the temporary solution ?

nmarulo commented 1 year ago

@chinmaym07 The solutions I gave were because I remember that I read something at the time, but I didn't investigate it thoroughly, so I don't know if they are the correct solutions.

Implement the one that works for you.