Special characters - Danish

Hi,
I have problem with special Danish characters.
We have 3 charterers: æøå
I have a shiny application with 2 files server.R and ui.R
If I use one of the Danish characters in a comment/text inside the file.
I get this error message:

ERROR: Error sourcing C:\Users\TUEHEL~1\AppData\Local\Temp\RtmpED9tet\file2ca0775a702e
...
sidebarPanel(helpText("Du har mulighed for at vælge kun at se et bestemt land"),
selectInput("valgtland", h3("Vælg land"),
choices = salg$Country,
selected = 1)),
...
If I remove the Danish charterers it works just fine?
What to do :slight_smile: ?

1 Like

Despite a couple of handicaps (my name is Richard Careaga and I've been window-free for 15 years) and I don't use shiny much.

I think there are two solutions, one cumbersome and the other perhaps a long-shot.

The cumbersome approach is to use Unicode for the "special" (Anglocentrically) characters, rather than relying on encoding.

The other possibility is to save the source file with LATIN-1 or the usual encoding for Danish-language documents, rather than UTF-8. I think that will work if shiny permits.

There goes one guess. Try U+00E6 ?

On error but it just shows the code: U+00E6

/Tue

1 Like

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

Hi,
Thanks for your answer - I'm normally using uft8 and utf8 is capable of showing the Danish characters.
LATIN-1 is not showing op as an possibility in my editor

1 Like

Let's see if my head is screwed on right this time.

There's a Character Encoding support article that addresses this. Following it, I get the following

dansk <- "Fjerde bind af Dansk Sproghistorie har fået titlen Dansk i brug og viser gennem de i alt 16 kapitler og bindets mange illustrationer hvordan almensproget gennem tiden er blevet påvirket af forskellige sproglige genrer – fra middelalderens første lovtekster over 1700-tallets aviser på vers til nutidens sprog på de sociale medier."
dansk
#> [1] "Fjerde bind af Dansk Sproghistorie har fået titlen Dansk i brug og viser gennem de i alt 16 kapitler og bindets mange illustrationer hvordan almensproget gennem tiden er blevet påvirket af forskellige sproglige genrer – fra middelalderens første lovtekster over 1700-tallets aviser på vers til nutidens sprog på de sociale medier."

Created on 2020-03-14 by the reprex package (v0.3.0)