nextcloud / talk-android

📱😀 Video & audio calls through Nextcloud on Android
Other
549 stars 247 forks source link

emoji are displayed as 4 ???? #428

Closed SnackyWell closed 5 years ago

SnackyWell commented 5 years ago

I just started with Talk and got this Problem and try ti solve it with 4-byte support but my problem is now thare as before can you help me?

mario commented 5 years ago

Sounds very strange. So the only reason why this wouldn't work is if the DB was wrongly setup, but you say it should be fine. Did you try sending new emojis AFTER you've changed the DB?

SnackyWell commented 5 years ago

my MariaDB version is: 10.1.34-MariaDB-0ubuntu0.18.04.1 and done the Barracuda File format as you see here: +---------------------------------------+-------+-------------+ | NAME | SPACE | FILE_FORMAT | +---------------------------------------+-------+-------------+ | nextcloud/oc_accounts | 252 | Barracuda | | nextcloud/oc_activity | 253 | Barracuda | | nextcloud/oc_activity_mq | 254 | Barracuda | | nextcloud/oc_addressbookchanges | 255 | Barracuda | | nextcloud/oc_addressbooks | 256 | Barracuda | | nextcloud/oc_appconfig | 257 | Barracuda | | nextcloud/oc_authtoken | 258 | Barracuda | | nextcloud/oc_bruteforce_attempts | 259 | Barracuda | | nextcloud/oc_calendar_invitations | 260 | Barracuda | | nextcloud/oc_calendar_resources | 261 | Barracuda | | nextcloud/oc_calendar_rooms | 262 | Barracuda | | nextcloud/oc_calendarchanges | 263 | Barracuda | | nextcloud/oc_calendarobjects | 264 | Barracuda | | nextcloud/oc_calendarobjects_props | 265 | Barracuda | | nextcloud/oc_calendars | 266 | Barracuda | | nextcloud/oc_calendarsubscriptions | 267 | Barracuda | | nextcloud/oc_cards | 268 | Barracuda | | nextcloud/oc_cards_properties | 269 | Barracuda | | nextcloud/oc_comments | 270 | Barracuda | | nextcloud/oc_comments_read_markers | 271 | Barracuda | | nextcloud/oc_credentials | 272 | Barracuda | | nextcloud/oc_dav_shares | 273 | Barracuda | | nextcloud/oc_deck_assigned_labels | 274 | Barracuda | | nextcloud/oc_deck_assigned_users | 275 | Barracuda | | nextcloud/oc_deck_attachment | 276 | Barracuda | | nextcloud/oc_deck_board_acl | 277 | Barracuda | | nextcloud/oc_deck_boards | 278 | Barracuda | | nextcloud/oc_deck_cards | 279 | Barracuda | | nextcloud/oc_deck_labels | 280 | Barracuda | | nextcloud/oc_deck_stacks | 281 | Barracuda | | nextcloud/oc_directlink | 282 | Barracuda | | nextcloud/oc_federated_reshares | 283 | Barracuda | | nextcloud/oc_file_locks | 284 | Barracuda | | nextcloud/oc_filecache | 285 | Barracuda | | nextcloud/oc_files_trash | 286 | Barracuda | | nextcloud/oc_flow_checks | 287 | Barracuda | | nextcloud/oc_flow_operations | 288 | Barracuda | | nextcloud/oc_group_admin | 289 | Barracuda | | nextcloud/oc_group_folders | 290 | Barracuda | | nextcloud/oc_group_folders_groups | 291 | Barracuda | | nextcloud/oc_group_folders_trash | 292 | Barracuda | | nextcloud/oc_group_user | 293 | Barracuda | | nextcloud/oc_groups | 294 | Barracuda | | nextcloud/oc_jobs | 295 | Barracuda | | nextcloud/oc_mail_accounts | 296 | Barracuda | | nextcloud/oc_mail_aliases | 297 | Barracuda | | nextcloud/oc_mail_attachments | 298 | Barracuda | | nextcloud/oc_mail_coll_addresses | 299 | Barracuda | | nextcloud/oc_migrations | 300 | Barracuda | | nextcloud/oc_mimetypes | 301 | Barracuda | | nextcloud/oc_mounts | 302 | Barracuda | | nextcloud/oc_notifications | 303 | Barracuda | | nextcloud/oc_notifications_pushtokens | 304 | Barracuda | | nextcloud/oc_oauth2_access_tokens | 305 | Barracuda | | nextcloud/oc_oauth2_clients | 306 | Barracuda | | nextcloud/oc_preferences | 307 | Barracuda | | nextcloud/oc_properties | 308 | Barracuda | | nextcloud/oc_richdocuments_assets | 309 | Barracuda | | nextcloud/oc_richdocuments_direct | 310 | Barracuda | | nextcloud/oc_richdocuments_member | 311 | Barracuda | | nextcloud/oc_richdocuments_wopi | 312 | Barracuda | | nextcloud/oc_schedulingobjects | 313 | Barracuda | | nextcloud/oc_share | 314 | Barracuda | | nextcloud/oc_share_external | 315 | Barracuda | | nextcloud/oc_social_cache_actors | 316 | Barracuda | | nextcloud/oc_social_cache_documents | 317 | Barracuda | | nextcloud/oc_social_request_queue | 318 | Barracuda | | nextcloud/oc_social_server_actors | 319 | Barracuda | | nextcloud/oc_social_server_follows | 320 | Barracuda | | nextcloud/oc_social_server_notes | 321 | Barracuda | | nextcloud/oc_storages | 322 | Barracuda | | nextcloud/oc_systemtag | 323 | Barracuda | | nextcloud/oc_systemtag_group | 324 | Barracuda | | nextcloud/oc_systemtag_object_mapping | 325 | Barracuda | | nextcloud/oc_talk_guests | 326 | Barracuda | | nextcloud/oc_talk_participants | 327 | Barracuda | | nextcloud/oc_talk_rooms | 328 | Barracuda | | nextcloud/oc_talk_signaling | 329 | Barracuda | | nextcloud/oc_trusted_servers | 330 | Barracuda | | nextcloud/oc_twofactor_backupcodes | 331 | Barracuda | | nextcloud/oc_twofactor_providers | 332 | Barracuda | | nextcloud/oc_users | 333 | Barracuda | | nextcloud/oc_vcategory | 334 | Barracuda | | nextcloud/oc_vcategory_to_object | 335 | Barracuda | | nextcloud/oc_whats_new | 336 | Barracuda | +---------------------------------------+-------+-------------+ and my "my.cnf" under "/etc/mysql/my.cnf" shows like that:

`# The MariaDB configuration file #

The MariaDB/MySQL tools read configuration files in the following order:

1. "/etc/mysql/mariadb.cnf" (this file) to set global defaults,

2. "/etc/mysql/conf.d/*.cnf" to set global options.

3. "/etc/mysql/mariadb.conf.d/*.cnf" to set MariaDB-only options.

4. "~/.my.cnf" to set user-specific options.

#

If the same option is defined multiple times, the last one will apply.

#

One can use all long options that the program supports.

Run program with --help to get a list of available options and with

--print-defaults to see which it would actually understand and use.

#

This group is read both both by the client and the server

use it for options that affect everything

# [server] skip-name-resolve innodb_buffer_pool_size = 128M innodb_buffer_pool_instances = 1 innodb_flush_log_at_trx_commit = 2 innodb_log_buffer_size = 32M innodb_max_dirty_pages_pct = 90 query_cache_type = 1 query_cache_limit = 2M query_cache_min_res_unit = 2k query_cache_size = 64M tmp_table_size= 64M max_heap_table_size= 64M slow-query-log = 1 slow-query-log-file = /var/log/mysql/slow.log long_query_time = 1

[client-server] !includedir /etc/mysql/conf.d/ !includedir /etc/mysql/mariadb.conf.d/

[client] default-character-set = utf8mb4

[mysqld] character-set-server = utf8mb4 collation-server = utf8mb4_general_ci transaction_isolation = READ-COMMITTED binlog_format = ROW innodb_large_prefix=on innodb_file_format=barracuda innodb_file_per_table=1 `

and this is my chat on Talk app: screenshot_20190125-112842

mario commented 5 years ago

Thanks for this. Well, first of all I do see that some emojis are working which makes it a bit strange.

I have absolutely no idea if this is needed for Maria, but maybe you can give it a shot if you haven't already?

sudo -u www-data php occ config:system:set mysql.utf8mb4 --type boolean --value="true"

SnackyWell commented 5 years ago

Since i done this got an error while looking in the users and the emoji are doesent work anyways

SnackyWell commented 5 years ago
`Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'SELECT `uid`, `displayname` FROM `oc_users` `u` LEFT JOIN `oc_preferences` `p` ON (`userid` = `uid`) AND (`appid` = 'settings') AND (`configkey` = 'email') WHERE (`uid` COLLATE utf8mb4_general_ci LIKE ?) OR (`displayname` COLLATE utf8mb4_general_ci LIKE ?) OR (`configvalue` COLLATE utf8mb4_general_ci LIKE ?) ORDER BY `uid_lower` ASC LIMIT 25 OFFSET 0' with params ["%%", "%%", "%%"]: SQLSTATE[42000]: Syntax error or access violation: 1253 COLLATION 'utf8mb4_general_ci' is not valid for CHARACTER SET 'utf8'
/var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php - line 128:

Doctrine\DBAL\Driver\AbstractMySQLDriver->convertException("An exceptio ... '", Doctrine\DBA ... ]})

/var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php - line 855:

Doctrine\DBAL\DBALException::driverExceptionDuringQuery(Doctrine\DBA ... {}, Doctrine\DBA ... ]}, "SELECT `uid ... 0", { 1: "%%",2: "%%",3: "%%"})

/var/www/html/lib/private/DB/Connection.php - line 195:

Doctrine\DBAL\Connection->executeQuery("SELECT `uid ... 0", { 1: "%%",2: "%%",3: "%%"}, { 1: 2,2: 2,3: 2}, null)

/var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php - line 206:

OC\DB\Connection->executeQuery("SELECT `uid ... 0", { 1: "%%",2: "%%",3: "%%"}, { 1: 2,2: 2,3: 2})

/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php - line 214:

Doctrine\DBAL\Query\QueryBuilder->execute()

/var/www/html/lib/private/User/Database.php - line 282:

OC\DB\QueryBuilder\QueryBuilder->execute()

/var/www/html/lib/private/User/Database.php - line 383:

OC\User\Database->getDisplayNames("", "25", "0")

/var/www/html/lib/private/User/Manager.php - line 229:

OC\User\Database->getUsers("", "25", "0")

/var/www/html/apps/provisioning_api/lib/Controller/UsersController.php - line 165:

OC\User\Manager->search("", "25", "0")

/var/www/html/lib/private/AppFramework/Http/Dispatcher.php - line 166:

OCA\Provisioning_API\Controller\UsersController->getUsersDetails("", "25", "0")

/var/www/html/lib/private/AppFramework/Http/Dispatcher.php - line 99:

OC\AppFramework\Http\Dispatcher->executeController(OCA\Provisio ... {}, "getUsersDetails")

/var/www/html/lib/private/AppFramework/App.php - line 118:

OC\AppFramework\Http\Dispatcher->dispatch(OCA\Provisio ... {}, "getUsersDetails")

/var/www/html/lib/private/AppFramework/Routing/RouteActionHandler.php - line 47:

OC\AppFramework\App::main("OCA\\Provis ... r", "getUsersDetails", OC\AppFramew ... {}, { _route: "o ... "})

<<closure>>

OC\AppFramework\Routing\RouteActionHandler->__invoke({ _route: "o ... "})

/var/www/html/lib/private/Route/Router.php - line 297:

call_user_func(OC\AppFramew ... {}, { _route: "o ... "})

/var/www/html/ocs/v1.php - line 82:

OC\Route\Router->match("/ocsapp/cloud/users/details")

/var/www/html/ocs/v2.php - line 24:

require_once("/var/www/html/ocs/v1.php")

Eingefasst vonDoctrine\DBAL\Driver\PDOException: SQLSTATE[42000]: Syntax error or access violation: 1253 COLLATION 'utf8mb4_general_ci' is not valid for CHARACTER SET 'utf8'
/var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php - line 847:

Doctrine\DBAL\Driver\PDOStatement->execute()

/var/www/html/lib/private/DB/Connection.php - line 195:

Doctrine\DBAL\Connection->executeQuery("SELECT `uid ... 0", { 1: "%%",2: "%%",3: "%%"}, { 1: 2,2: 2,3: 2}, null)

/var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php - line 206:

OC\DB\Connection->executeQuery("SELECT `uid ... 0", { 1: "%%",2: "%%",3: "%%"}, { 1: 2,2: 2,3: 2})

/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php - line 214:

Doctrine\DBAL\Query\QueryBuilder->execute()

/var/www/html/lib/private/User/Database.php - line 282:

OC\DB\QueryBuilder\QueryBuilder->execute()

/var/www/html/lib/private/User/Database.php - line 383:

OC\User\Database->getDisplayNames("", "25", "0")

/var/www/html/lib/private/User/Manager.php - line 229:

OC\User\Database->getUsers("", "25", "0")

/var/www/html/apps/provisioning_api/lib/Controller/UsersController.php - line 165:

OC\User\Manager->search("", "25", "0")

/var/www/html/lib/private/AppFramework/Http/Dispatcher.php - line 166:

OCA\Provisioning_API\Controller\UsersController->getUsersDetails("", "25", "0")

/var/www/html/lib/private/AppFramework/Http/Dispatcher.php - line 99:

OC\AppFramework\Http\Dispatcher->executeController(OCA\Provisio ... {}, "getUsersDetails")

/var/www/html/lib/private/AppFramework/App.php - line 118:

OC\AppFramework\Http\Dispatcher->dispatch(OCA\Provisio ... {}, "getUsersDetails")

/var/www/html/lib/private/AppFramework/Routing/RouteActionHandler.php - line 47:

OC\AppFramework\App::main("OCA\\Provis ... r", "getUsersDetails", OC\AppFramew ... {}, { _route: "o ... "})

<<closure>>

OC\AppFramework\Routing\RouteActionHandler->__invoke({ _route: "o ... "})

/var/www/html/lib/private/Route/Router.php - line 297:

call_user_func(OC\AppFramew ... {}, { _route: "o ... "})

/var/www/html/ocs/v1.php - line 82:

OC\Route\Router->match("/ocsapp/cloud/users/details")

/var/www/html/ocs/v2.php - line 24:

require_once("/var/www/html/ocs/v1.php")

Eingefasst vonPDOException: SQLSTATE[42000]: Syntax error or access violation: 1253 COLLATION 'utf8mb4_general_ci' is not valid for CHARACTER SET 'utf8'
/var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php - line 105:

PDOStatement->execute(null)

/var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php - line 847:

Doctrine\DBAL\Driver\PDOStatement->execute()

/var/www/html/lib/private/DB/Connection.php - line 195:

Doctrine\DBAL\Connection->executeQuery("SELECT `uid ... 0", { 1: "%%",2: "%%",3: "%%"}, { 1: 2,2: 2,3: 2}, null)

/var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php - line 206:

OC\DB\Connection->executeQuery("SELECT `uid ... 0", { 1: "%%",2: "%%",3: "%%"}, { 1: 2,2: 2,3: 2})

/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php - line 214:

Doctrine\DBAL\Query\QueryBuilder->execute()

/var/www/html/lib/private/User/Database.php - line 282:

OC\DB\QueryBuilder\QueryBuilder->execute()

/var/www/html/lib/private/User/Database.php - line 383:

OC\User\Database->getDisplayNames("", "25", "0")

/var/www/html/lib/private/User/Manager.php - line 229:

OC\User\Database->getUsers("", "25", "0")

/var/www/html/apps/provisioning_api/lib/Controller/UsersController.php - line 165:

OC\User\Manager->search("", "25", "0")

/var/www/html/lib/private/AppFramework/Http/Dispatcher.php - line 166:

OCA\Provisioning_API\Controller\UsersController->getUsersDetails("", "25", "0")

/var/www/html/lib/private/AppFramework/Http/Dispatcher.php - line 99:

OC\AppFramework\Http\Dispatcher->executeController(OCA\Provisio ... {}, "getUsersDetails")

/var/www/html/lib/private/AppFramework/App.php - line 118:

OC\AppFramework\Http\Dispatcher->dispatch(OCA\Provisio ... {}, "getUsersDetails")

/var/www/html/lib/private/AppFramework/Routing/RouteActionHandler.php - line 47:

OC\AppFramework\App::main("OCA\\Provis ... r", "getUsersDetails", OC\AppFramew ... {}, { _route: "o ... "})

<<closure>>

OC\AppFramework\Routing\RouteActionHandler->__invoke({ _route: "o ... "})

/var/www/html/lib/private/Route/Router.php - line 297:

call_user_func(OC\AppFramew ... {}, { _route: "o ... "})

/var/www/html/ocs/v1.php - line 82:

OC\Route\Router->match("/ocsapp/cloud/users/details")

/var/www/html/ocs/v2.php - line 24:

require_once("/var/www/html/ocs/v1.php")`
mario commented 5 years ago

The error itself tells you that character set is utf8 while it should be utf8mb4.