How to allow utf-8 unicode (utf8) storing on dreamfactory?

Any idea how can utf-8 unicode (utf8) storing be allowed on dreamfactory?

1 Like

Hi,

in theory, you set the supports_multibyte option on fields that shall support UTF-8 content. But due to the following bug, those settings won’t be persisted when made inside the DSP.

(cannot post this link as it counts as more than two links) github.com/dreamfactorysoftware/dsp-core/issues/59

This bug will be resolved in the next release mid-January.

Thanks @spackmat @benbusse , will be waiting for the next update

Does support for UTF8 now exist in DreamFactory 2.0? As I’m still seeing ??? (question mark) characters where Unicode characters should be

Upon further investigation, the supports_multibyte: true option is showing in the table definition when I do a sample API request to see schema e.g. /api/v2/{resource}/_schema/{table_name}, but I’m still seeing questions marks (???) in the response to single or multiple records e.g. /api/v2/{resource}/_table/{table}/{id} where there should be UTF8 characters instead

I managed to solve my own problem in Dreamfactory 2.0 by editing the Connection String (DSN) field found in Services -> (your service) -> Config tab -> Connection String (DSN) field -> mysql:host=localhost;port=3306;dbname={dbname};charset=utf8;. Also, just to note that DreamFactory managed to correctly identify which fields needed to be supports_multibyte: true so it required no further configuration other than this to support UTF8 databases. Also, I am using MySQL and have not tried other databases.

1 Like

@jasdeepkhalsa, thanks for that tip. That resolved a general issue I’ve been investigating with accented characters.

A post was split to a new topic: Help with utf-8 in platform.api