What characters should be escaped in application.properties in Spring? [closed]












-1















While ago I found a problem which appears to be connected to application.properties in my java spring app. On local dev machines we use simple application.yml files which are compiled into app (I guess?), but when we deploy on production we use more secure properties. It seems that some of them are read wrong. So my question is what kind of characters are prohibited in application.properties file? How can I escape these characters?










share|improve this question













closed as off-topic by Seelenvirtuose, rkosegi, DanielBarbarian, Rob, pirho Nov 23 '18 at 16:50


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: How to create a Minimal, Complete, and Verifiable example." – Seelenvirtuose, rkosegi, DanielBarbarian, Rob, pirho

If this question can be reworded to fit the rules in the help center, please edit the question.












  • 1





    If the problematic characters are accented vowels (áéíóú etc) then this question may be of relevance.

    – jsheeran
    Nov 23 '18 at 8:20











  • Sadly, that is not the case - I have few @!# characters but I was wondering what kind of characters except accented ones are not read correctly

    – mkubacki
    Nov 23 '18 at 8:47
















-1















While ago I found a problem which appears to be connected to application.properties in my java spring app. On local dev machines we use simple application.yml files which are compiled into app (I guess?), but when we deploy on production we use more secure properties. It seems that some of them are read wrong. So my question is what kind of characters are prohibited in application.properties file? How can I escape these characters?










share|improve this question













closed as off-topic by Seelenvirtuose, rkosegi, DanielBarbarian, Rob, pirho Nov 23 '18 at 16:50


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: How to create a Minimal, Complete, and Verifiable example." – Seelenvirtuose, rkosegi, DanielBarbarian, Rob, pirho

If this question can be reworded to fit the rules in the help center, please edit the question.












  • 1





    If the problematic characters are accented vowels (áéíóú etc) then this question may be of relevance.

    – jsheeran
    Nov 23 '18 at 8:20











  • Sadly, that is not the case - I have few @!# characters but I was wondering what kind of characters except accented ones are not read correctly

    – mkubacki
    Nov 23 '18 at 8:47














-1












-1








-1








While ago I found a problem which appears to be connected to application.properties in my java spring app. On local dev machines we use simple application.yml files which are compiled into app (I guess?), but when we deploy on production we use more secure properties. It seems that some of them are read wrong. So my question is what kind of characters are prohibited in application.properties file? How can I escape these characters?










share|improve this question














While ago I found a problem which appears to be connected to application.properties in my java spring app. On local dev machines we use simple application.yml files which are compiled into app (I guess?), but when we deploy on production we use more secure properties. It seems that some of them are read wrong. So my question is what kind of characters are prohibited in application.properties file? How can I escape these characters?







java spring






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 23 '18 at 8:10









mkubackimkubacki

41929




41929




closed as off-topic by Seelenvirtuose, rkosegi, DanielBarbarian, Rob, pirho Nov 23 '18 at 16:50


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: How to create a Minimal, Complete, and Verifiable example." – Seelenvirtuose, rkosegi, DanielBarbarian, Rob, pirho

If this question can be reworded to fit the rules in the help center, please edit the question.







closed as off-topic by Seelenvirtuose, rkosegi, DanielBarbarian, Rob, pirho Nov 23 '18 at 16:50


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: How to create a Minimal, Complete, and Verifiable example." – Seelenvirtuose, rkosegi, DanielBarbarian, Rob, pirho

If this question can be reworded to fit the rules in the help center, please edit the question.








  • 1





    If the problematic characters are accented vowels (áéíóú etc) then this question may be of relevance.

    – jsheeran
    Nov 23 '18 at 8:20











  • Sadly, that is not the case - I have few @!# characters but I was wondering what kind of characters except accented ones are not read correctly

    – mkubacki
    Nov 23 '18 at 8:47














  • 1





    If the problematic characters are accented vowels (áéíóú etc) then this question may be of relevance.

    – jsheeran
    Nov 23 '18 at 8:20











  • Sadly, that is not the case - I have few @!# characters but I was wondering what kind of characters except accented ones are not read correctly

    – mkubacki
    Nov 23 '18 at 8:47








1




1





If the problematic characters are accented vowels (áéíóú etc) then this question may be of relevance.

– jsheeran
Nov 23 '18 at 8:20





If the problematic characters are accented vowels (áéíóú etc) then this question may be of relevance.

– jsheeran
Nov 23 '18 at 8:20













Sadly, that is not the case - I have few @!# characters but I was wondering what kind of characters except accented ones are not read correctly

– mkubacki
Nov 23 '18 at 8:47





Sadly, that is not the case - I have few @!# characters but I was wondering what kind of characters except accented ones are not read correctly

– mkubacki
Nov 23 '18 at 8:47












1 Answer
1






active

oldest

votes


















1














The YAML format supports UTF-8 by default, whereas properties files must be encoded and are read in the ISO-8859-1 encoding by definition. So any non-ISO-8859-1 character is going to cause you issues unless you escape them in the .properties files.



You escape the Unicode characters in properties files by using their hex code prefixed with "u". For example, "ä" would be encoded as u00E4, and the snowman, ☃, would be encoded as u2603. You can find the escape codes, for example, here.






share|improve this answer






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    The YAML format supports UTF-8 by default, whereas properties files must be encoded and are read in the ISO-8859-1 encoding by definition. So any non-ISO-8859-1 character is going to cause you issues unless you escape them in the .properties files.



    You escape the Unicode characters in properties files by using their hex code prefixed with "u". For example, "ä" would be encoded as u00E4, and the snowman, ☃, would be encoded as u2603. You can find the escape codes, for example, here.






    share|improve this answer




























      1














      The YAML format supports UTF-8 by default, whereas properties files must be encoded and are read in the ISO-8859-1 encoding by definition. So any non-ISO-8859-1 character is going to cause you issues unless you escape them in the .properties files.



      You escape the Unicode characters in properties files by using their hex code prefixed with "u". For example, "ä" would be encoded as u00E4, and the snowman, ☃, would be encoded as u2603. You can find the escape codes, for example, here.






      share|improve this answer


























        1












        1








        1







        The YAML format supports UTF-8 by default, whereas properties files must be encoded and are read in the ISO-8859-1 encoding by definition. So any non-ISO-8859-1 character is going to cause you issues unless you escape them in the .properties files.



        You escape the Unicode characters in properties files by using their hex code prefixed with "u". For example, "ä" would be encoded as u00E4, and the snowman, ☃, would be encoded as u2603. You can find the escape codes, for example, here.






        share|improve this answer













        The YAML format supports UTF-8 by default, whereas properties files must be encoded and are read in the ISO-8859-1 encoding by definition. So any non-ISO-8859-1 character is going to cause you issues unless you escape them in the .properties files.



        You escape the Unicode characters in properties files by using their hex code prefixed with "u". For example, "ä" would be encoded as u00E4, and the snowman, ☃, would be encoded as u2603. You can find the escape codes, for example, here.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 23 '18 at 9:08









        ZeroOneZeroOne

        1,87311744




        1,87311744

















            Popular posts from this blog

            If I really need a card on my start hand, how many mulligans make sense? [duplicate]

            Alcedinidae

            Can an atomic nucleus contain both particles and antiparticles? [duplicate]