Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Nextcloud file:scan -all error about encoding

Featured Replies

I have made a massive copy from my old cloud to new folder in nextcloud. I wrote:

 

docker exec --user 99 Nextcloud php occ files:scan --all

 

But I have errors about encondig with tildes or ñ

 

Entry "files/Documents/Uned/estadistica/formulario/Formulario_Estadística_Aplicada_2013_2014 (1).pdf" will not be accessible due to incompatible encoding
        Entry "files/Documents/Uned/estadistica/material de Marcos Roman/Resumen Marcos Román .pdf" will not be accessible due to incompatible encoding
        Entry "files/Documents/Uned/estadistica/pec obligatorio/Eva Moyano Atienza. 30958971. PEC DE ESTADÍSTICA..pdf" will not be accessible due to incompatible encoding
        Entry "files/Documents/Uned/estadistica/resumen Nora/Resumen Estadística Nora Tudela.pdf" will not be accessible due to incompatible encoding
        Entry "files/Documents/Uned/estadistica/resumen Nora/Resumen Estadística Nora TudelaTema 1 y 2.docx" will not be accessible due to incompatible encoding
        Entry "files/Documents/Uned/estadistica/resumen Nora/Resumen Estadística Nora TudelaTema 4 y 5.pdf" will not be accessible due to incompatible encoding
        Entry "files/Documents/Uned/estadistica/resumen Nora/Resumen Estadística Nora TudelaTema 6.pdf" will not be accessible due to incompatible encoding
        Entry "files/Documents/Uned/estadistica/resumen Nora/Resumen Estadística Nora TudelaTema 7.pdf" will not be accessible due to incompatible encoding
        Entry "files/Documents/Uned/estadistica/resumen Nora/Resumen Estadística Nora TudelaTema 8.pdf" will not be accessible due to incompatible encoding
        Entry "files/Documents/fotos Paula y Manuela/Vídeo.MOV" will not be accessible due to incompatible encoding
+---------+-------+-----+---------+---------+--------+--------------+
| Folders | Files | New | Updated | Removed | Errors | Elapsed time |
+---------+-------+-----+---------+---------+--------+--------------+
| 169     | 15946 | 0   | 14658   | 2       | 191    | 00:04:51     |
+---------+-------+-----+---------+---------+--------+--------------+

 

 

I have a lot of errors about that.  Thank for your help!!!!!

 

I have asked about that but nobody can help me

Solved by bmartino1

  • Community Expert

you need to setup the config file and set a encode such as utf-8:

Review the docs:
https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/index.html

https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/config_sample_php_parameters.html

config.php needs additional setting to use those characters

ad

default_locale
to your config.php file.

Edited by bmartino1

  • Author

My config.php is :

 

<?php
$CONFIG = array (
  'htaccess.RewriteBase' => '/',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 => 
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
    ),
  ),
  'upgrade.disable-web' => true,
  'instanceid' => 'xxxxxxxxxx',
  'passwordsalt' => 'xxxxxxxxxxx',
  'secret' => 'xxxxxxxxxxxxxxxxx',
  'trusted_domains' => 
  array (
    0 => '192.168.0.10:8666',
  ),
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'mysql',
  'version' => '30.0.1.2',
  'overwrite.cli.url' => 'http://192.168.0.10:8666',
  'dbname' => 'db_nextcloud',
  'dbhost' => '192.168.0.10:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'xxxxxx',
  'dbpassword' => 'xxxxxxx',
  'installed' => true,
  'mail_from_address' => 'unraid',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'xxxxxxx',
  'mail_smtphost' => 'xxxxx',
  'mail_smtpport' => '587',
  'mail_smtpauth' => 1,
  'mail_smtpname' => 'xxxxxxxxx',
  'mail_smtppassword' => 'xxxxxxxxx',
  'maintenance' => false,
  'default_language' => 'es',
  'default_locale' => 'es_ES',
  'force_language' => 'es',
  'loglevel' => 2,
  'memories.db.triggers.fcu' => true,
  'memories.exiftool' => '/var/www/html/custom_apps/memories/bin-ext/exiftool-amd64-glibc',
  'memories.vod.path' => '/var/www/html/custom_apps/memories/bin-ext/go-vod-amd64',
  'mysql.utf8mb4' => true,
);

 

I have added default_locale and mysql.tf8mb4   

 

  • Author

I am not expert about that. Please. I need help step by step..

I can create a file with ñ or í ó etc, but the errors appeas when I make an SCAN all to add files to database

 

  Thanks again,

Edited by Atorcha

  • Community Expert
  • Solution
4 hours ago, Atorcha said:

I am not expert about that. Please. I need help step by step..

I can create a file with ñ or í ó etc, but the errors appeas when I make an SCAN all to add files to database

 

  Thanks again,

 Ok i wil try:

 

Summary

Check file system encoding: Ensure UTF-8 is used.

Database: Ensure utf8mb4 encoding is properly set.

PHP Settings: Ensure PHP uses UTF-8 by default.

Nextcloud config: Enable 'filesystem_check_changes' => 1.

System Locale: Set server locale to es_ES.UTF-8.

Docker Locale: If using Docker, set locale environment variables.



As It looks like the issue with Nextcloud's files:scan --all command picking up files with Spanish characters (like ñ, í, ó) relates to incompatible encoding. Here are some steps you can take to resolve this:

You ned to use UTF-8...

1. Check File System Encoding

Make sure the file system where Nextcloud is running supports UTF-8. Encoding issues often arise when the file system uses a different character encoding.

 

2. Database Encoding

Ensure that your database is set to support utf8mb4 character encoding. You have 'mysql.utf8mb4' => true in your config, which is good, but you should also verify that all the tables in your database are using the utf8mb4 charset.

login to your mysql with your 
'dbuser' => 'xxxxxx', 'dbpassword' => 'xxxxxxx', 

*as your database tables may not have been created with the utf8mb4...

You can run the following SQL command on your database to verify the character set:

SHOW TABLE STATUS WHERE `Collation` NOT LIKE 'utf8mb4_%';



If any table uses a different collation, consider converting it using:
 

ALTER TABLE table_name CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;


 

3. PHP Configuration

Ensure that your PHP environment is configured to handle UTF-8 characters. You can adjust your php.ini to make sure:

default_charset = "UTF-8"

Restart the PHP and web server services after making changes.

 

4. File Scanning Configuration

Consider trying to adjust the encoding in your Nextcloud instance. You might want to add the following line to your config.php:

'filesystem_check_changes' => 1,

This will force Nextcloud to recheck the files regularly, potentially addressing encoding issues for existing files.

####################################

5. Locale Settings
since you have:

'default_language' => 'es',
'default_locale' => 'es_ES',
'force_language' => 'es',

Make sure the system locale of your server is also set to es_ES.UTF-8. You can configure it by running:

locale-gen es_ES.UTF-8
update-locale LANG=es_ES.UTF-8

^- Unraid settings as well...

Go to Settings > Display Settings....
Restart your server after applying these settings.

since using docker set exra varabiles...

in docker compose you would add:
 

environment:
  - LANG=es_ES.UTF-8
  - LANGUAGE=es_ES.UTF-8
  - LC_ALL=es_ES.UTF-8


In unraid edit docker add varable and ill it in then apply...

if above failes then....

7. File Renaming

If the above methods do not solve the issue, it might be helpful to rename problematic files manually and remove any special characters, as a temporary workaround.

Meaning don't use files with thoese characters...

  • Community Expert

these are better asked on the https://help.nextcloud.com/

I no longer run nextcloud of other reasons...

Here is a updated php with recommend edits... Pleas re added and fix you XXXXX with their correct values with these broken nextclound will not function...

ES<?php
$CONFIG = array (
  'htaccess.RewriteBase' => '/',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 => 
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
    ),
  ),
  'upgrade.disable-web' => true,
  'instanceid' => 'xxxxxxxxxx',
  'passwordsalt' => 'xxxxxxxxxxx',
  'secret' => 'xxxxxxxxxxxxxxxxx',
  'trusted_domains' => 
  array (
    0 => '192.168.0.10:8666',
  ),
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'mysql',
  'version' => '30.0.1.2',
  'overwrite.cli.url' => 'http://192.168.0.10:8666',
  'dbname' => 'db_nextcloud',
  'dbhost' => '192.168.0.10:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'xxxxxx',
  'dbpassword' => 'xxxxxxx',
  'installed' => true,
  'mail_from_address' => 'unraid',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'xxxxxxx',
  'mail_smtphost' => 'xxxxx',
  'mail_smtpport' => '587',
  'mail_smtpauth' => 1,
  'mail_smtpname' => 'xxxxxxxxx',
  'mail_smtppassword' => 'xxxxxxxxx',
  'maintenance' => false,
  'default_language' => 'es',
  'default_locale' => 'es_ES.UTF-8',
  'force_locale' => 'es_ES.UTF-8',
  'force_language' => 'es',
  'loglevel' => 2,
  'memories.db.triggers.fcu' => true,
  'memories.exiftool' => '/var/www/html/custom_apps/memories/bin-ext/exiftool-amd64-glibc',
  'memories.vod.path' => '/var/www/html/custom_apps/memories/bin-ext/go-vod-amd64',
  'filesystem_check_changes' => 1,
  'default_phone_region' => 'ES',
  'default_timezone' => 'America/Chicago',
);

 

  • Author

I tested it, but I can not make it work. I will try to move files to PC folder and wait it syncs itself. Thankas a lot for you effort.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.