Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Degree sign (UTF-8) for widget unit #17

Closed
oscar-b opened this issue Jan 5, 2013 · 7 comments
Closed

Degree sign (UTF-8) for widget unit #17

oscar-b opened this issue Jan 5, 2013 · 7 comments
Labels

Comments

@oscar-b
Copy link
Contributor

oscar-b commented Jan 5, 2013

When setting up a regular feedvalue widget for temperature, I tried using ° as unit which didn't work.

It seems as if emoncms isn't prepared for UTF-8? Seems like a strange decision, what's the reason for this?

Either way, changing the encoding of DB table dashboard to UTF-8 (why is cp1252/latin1 used?), and changing the mysqli connection charset to UTF-8 does the trick (except saving the dashboard to the DB).

@TrystanLea
Copy link
Member

Hello Oscar. I had just used default db table encoding, no specific decision was made really. Table encoding isnt something I know much about, i guess there may some implications to changing it? I havent looked into it. Its possible to do get a degree sign though with the html notation ° as the output of the units field for a dial or feedvalue is rendered html. Is that sufficient?
Trystan

@oscar-b
Copy link
Contributor Author

oscar-b commented Jan 14, 2013

Hi

I'm not sure if changing encoding of existing installations poses any problems, I'm guessing that converting to UTF-8 should be fairly safe, but I don't know.

Generally speaking, trying to use UTF-8 for everything will probably save you some internationalization headaches later on, but using old school html notation is probably enough in this case :)

/O

@oscar-b
Copy link
Contributor Author

oscar-b commented Jan 26, 2013

Hmm, just tried entering ° as unit here, and it doesn't work, it just outputs it in plain text. Does that work for you?

@oscar-b
Copy link
Contributor Author

oscar-b commented Feb 11, 2013

Some information about changing collation:
http://stackoverflow.com/questions/742205/mysql-alter-table-collation

@lafrech
Copy link

lafrech commented Mar 4, 2013

It actually is annoying. Not only the degree sign is missing. Accentuated characters are lost as well.

Is there any objection to moving to UTF-8 ? What would be the best procedure ?

@TrystanLea
Copy link
Member

Looks like alter table <some_table> convert to character set utf8 collate utf8_unicode_ci; would do it and I guess we would need to specify utf8 in the table builder. - It might be worth missing making any changes to the new class-y :) emoncms implementation https://github.com/emoncms/emoncms_framework

I'm just completing the conversion of the input module at the moment so will soon be ready for a big update to the main emoncms repository.

@oscar-b
Copy link
Contributor Author

oscar-b commented Sep 15, 2014

@TrystanLea Has it been resolved?

vkylamba pushed a commit to vkylamba/emoncms that referenced this issue Mar 17, 2017
Add apikey to list query, so that you can view dashboards with the readkey
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants