dittodb icon indicating copy to clipboard operation
dittodb copied to clipboard

Update vignette w non-ASCII chars

Open majazaloznik opened this issue 2 years ago • 1 comments

Add subsection to the "Things to be careful about" section explaining issues with non-ASCII characters in the db responses. See https://github.com/ropensci/dittodb/issues/165

majazaloznik avatar Jan 09 '23 12:01 majazaloznik

Here's the offending actions: the one before last (actually at least two if not three) were passing locally but not remotely (sorry for the very descriptive commit messages 😄 ). The last one then passed on both. It's not the mocks directly that are causing the issue, but it's a second order consequence, when they are used as inputs into other functions.. I think.

The substantive change in the last commit was the manual fix of that one mock file. I also added some print() statements for debugging and here's the output of one of them locally:

# A tibble: 6 x 3
  tab_dim_id level_value level_text                                             
       <int> <chr>       <chr>                                                  
1          2 V           Teko�e cene (mio EUR)                                  
2          2 Y           Stalne cene predhodnega leta (mio EUR)                 
3          2 L           Stalne cene, referen�no leto 2010 (mio EUR)            
4          2 G4          Stopnja rasti obsega glede na enako �etrtletje predhod~
5          2 G1          Stopnja rasti obsega glede na predhodno �etrtletje (%) 
6          2 GO4         Prispevek k rasti obsega BDP glede na enako �etrtletje~

And remotely:

# A tibble: 6 x 3
  tab_dim_id level_value level_text                                             
       <int> <chr>       <chr>                                                  
1          2 V           Tekoče cene (mio EUR)                                  
2          2 Y           Stalne cene predhodnega leta (mio EUR)                 
3          2 L           Stalne cene, referenčno leto 2010 (mio EUR)            
4          2 G4          Stopnja rasti obsega glede na enako četrtletje predhod~
5          2 G1          Stopnja rasti obsega glede na predhodno četrtletje (%) 
6          2 GO4         Prispevek k rasti obsega BDP glede na enako četrtletje~

Locally I'm on a Windows machine and I get this btw:

> dput(data.frame(col=c("č", "é", "😀")), file = "foo.R", control = c("all", "hexNumeric"))
> source("foo.R")$value
           col
1            č
2            é
3 <U+0001F600>

Thanks for taking the time to look into this!

majazaloznik avatar Jan 10 '23 07:01 majazaloznik