Skip to content

Fix RADIUS & Database Character Encoding Issues

Character encoding problems can cause data corruption, authentication failures, and display issues when handling usernames, passwords, or RADIUS attributes with non-ASCII characters.

Mideye Server handles characters in multiple contexts:

  • RADIUS protocol — Configurable encoding per client
  • LDAP/AD — UTF-8 by default
  • Database — UTF-8/UTF8MB4
  • Web interface — UTF-8
  • Configuration files — UTF-8

Encoding mismatches between these systems cause problems with international characters, accents, and special symbols.

  1. Scandinavian characters: å, ä, ö, Å, Ä, Ö, ø, æ
  2. Accented characters: é, è, ê, ñ, ü, ç
  3. Cyrillic characters: а, б, в, г, д
  4. Asian characters: 中, 日, 한
  5. Special punctuation: ”, ”, –, —

Problem: RADIUS client and Mideye Server use different character encodings, causing corruption of attributes with international characters.

Root Cause: The RADIUS protocol does not specify encoding. Mideye Server supports multiple encodings per RADIUS client:

EncodingDescriptionUse Case
UTF-8All characters including internationalMost modern devices
ISO-8859-1 (Latin-1)Western European charactersLegacy devices
US-ASCIIBasic Latin onlyVery old devices
UTF-16Rarely usedSpecific devices only

The encoding is configured per RADIUS client in the RADIUS Clients page.

Symptoms:

  • Username with å, ä, ö shows as garbage: ã¥, ã¤, ã¶
  • Reply-Message attribute displays incorrectly
  • Authentication fails for users with international characters

Solution:

  1. Navigate to RADIUS Clients in the web interface
  2. Edit the client
  3. Set Encoding to match what the RADIUS device sends (usually UTF-8)
  4. Save changes
  5. Test authentication with a user that has international characters

Problem: Users with accented or international characters in usernames cannot authenticate.

Symptoms:

  • User “José” cannot authenticate
  • User “Müller” shows as “M?ller”
  • Works for ASCII-only usernames

Solution:

  1. Ensure RADIUS client uses UTF-8:

  2. Check LDAP username attribute:

    • Navigate to LDAP Profiles
    • Use sAMAccountName (usually ASCII-only) for maximum compatibility
    • Or userPrincipalName if international characters are required
  3. Test with different username formats:

    • Try: jose@domain.com (ASCII)
    • Try: josé@domain.com (international)

Problem: Passwords containing special characters fail authentication even when correct.

Symptoms:

  • Password works from some devices, not others
  • Changing password to ASCII-only fixes the issue
  • Users report “correct password doesn’t work”

Solution:

  1. Set RADIUS client to UTF-8 encoding in RADIUS Clients

  2. For maximum compatibility, advise users to use passwords with:

    • Letters (a-z, A-Z)
    • Numbers (0-9)
    • Common symbols (!, @, #, $, %, ^, &, *)
    • Avoid international characters and emoji
  3. Test from different devices to identify device-specific encoding issues


Problem: Data stored in database appears corrupted when retrieved.

Symptoms:

  • Usernames with å, ä, ö show as garbled text
  • RADIUS reply messages corrupted
  • Configuration values with special characters fail

Solution:

See Database Issues for complete database encoding configuration.

Quick fix for new databases:

CREATE DATABASE mideyeserver
CHARACTER SET utf8mb4
COLLATE utf8mb4_unicode_ci;

Problem: Custom RADIUS reply messages with international characters appear corrupted on client devices.

Solution:

  1. Ensure the RADIUS client is configured for UTF-8 in RADIUS Clients
  2. Configure reply messages in RADIUS Servers or via authentication policies
  3. Test with a message containing international characters: “Välkommen! (Welcome!)”
  4. If the device doesn’t support UTF-8, use ASCII-only reply messages

Problem: Log files show corrupted characters when viewing authentication attempts.

Root Cause: Terminal or log viewer doesn’t support UTF-8.

Solution:

  1. Use the web interface — The Log Files page handles UTF-8 correctly

  2. Set terminal to UTF-8 (Linux):

    Terminal window
    export LANG=en_US.UTF-8
    export LC_ALL=en_US.UTF-8
  3. Check terminal encoding:

    Terminal window
    locale
    # Should show UTF-8 for LC_CTYPE
  4. Windows PowerShell: UTF-8 output is supported by default in modern PowerShell


  1. Standardize on UTF-8 everywhere:

    • Database: UTF8MB4
    • RADIUS clients: UTF-8
    • LDAP: UTF-8 (default)
  2. Test with international characters:

    • Create test account with characters like åsa.test@domain.com
    • Test authentication from all device types
    • Verify logs show characters correctly
  3. Document encoding configurations:

    • Which RADIUS clients use which encoding
    • Any legacy devices requiring non-UTF-8
  1. Usernames: ASCII-only usernames are most compatible across all devices
  2. Passwords: Avoid rare Unicode characters; stick to common special characters
  3. Report issues: Note the exact character causing the problem and the device type

Configuration: RADIUS Clients → Edit Client → Encoding field

OptionDescription
UTF-8 (Recommended)Supports all characters
ISO-8859-1 (Latin-1)Western European only
US-ASCIIBasic Latin only
UTF-16Rarely needed

Recommended: CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci


  1. Identify corrupted characters — Where do they appear? (logs, database, device)
  2. Check encoding at each layer — RADIUS client, database, terminal
  3. Test with ASCII-only — If ASCII works, confirms encoding mismatch
  4. Update encoding — Change to UTF-8 via the RADIUS Clients page
  5. Test thoroughly — All affected usernames, all device types

If encoding issues persist:

  1. Note the exact character causing the problem
  2. Document the RADIUS client encoding setting (from RADIUS Clients)
  3. Note which device/client is affected
  4. Contact Mideye Support with this information