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.
Overview
Section titled “Overview”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.
Problematic Character Categories
Section titled “Problematic Character Categories”- Scandinavian characters: å, ä, ö, Å, Ä, Ö, ø, æ
- Accented characters: é, è, ê, ñ, ü, ç
- Cyrillic characters: а, б, в, г, д
- Asian characters: 中, 日, 한
- Special punctuation: ”, ”, –, —
Common Issues
Section titled “Common Issues”1. RADIUS Encoding Mismatch
Section titled “1. RADIUS Encoding Mismatch”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:
| Encoding | Description | Use Case |
|---|---|---|
| UTF-8 | All characters including international | Most modern devices |
| ISO-8859-1 (Latin-1) | Western European characters | Legacy devices |
| US-ASCII | Basic Latin only | Very old devices |
| UTF-16 | Rarely used | Specific 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:
- Navigate to RADIUS Clients in the web interface
- Edit the client
- Set Encoding to match what the RADIUS device sends (usually UTF-8)
- Save changes
- Test authentication with a user that has international characters
2. Username with Special Characters Fails
Section titled “2. Username with Special Characters Fails”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:
-
Ensure RADIUS client uses UTF-8:
- Navigate to RADIUS Clients
- Update encoding to UTF-8
-
Check LDAP username attribute:
- Navigate to LDAP Profiles
- Use
sAMAccountName(usually ASCII-only) for maximum compatibility - Or
userPrincipalNameif international characters are required
-
Test with different username formats:
- Try:
jose@domain.com(ASCII) - Try:
josé@domain.com(international)
- Try:
3. Password with Special Characters
Section titled “3. Password with Special Characters”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:
-
Set RADIUS client to UTF-8 encoding in RADIUS Clients
-
For maximum compatibility, advise users to use passwords with:
- Letters (a-z, A-Z)
- Numbers (0-9)
- Common symbols (!, @, #, $, %, ^, &, *)
- Avoid international characters and emoji
-
Test from different devices to identify device-specific encoding issues
4. Database Encoding Issues
Section titled “4. Database 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;5. RADIUS Reply-Message Encoding
Section titled “5. RADIUS Reply-Message Encoding”Problem: Custom RADIUS reply messages with international characters appear corrupted on client devices.
Solution:
- Ensure the RADIUS client is configured for UTF-8 in RADIUS Clients
- Configure reply messages in RADIUS Servers or via authentication policies
- Test with a message containing international characters: “Välkommen! (Welcome!)”
- If the device doesn’t support UTF-8, use ASCII-only reply messages
6. Log Display Encoding Issues
Section titled “6. Log Display Encoding Issues”Problem: Log files show corrupted characters when viewing authentication attempts.
Root Cause: Terminal or log viewer doesn’t support UTF-8.
Solution:
-
Use the web interface — The Log Files page handles UTF-8 correctly
-
Set terminal to UTF-8 (Linux):
Terminal window export LANG=en_US.UTF-8export LC_ALL=en_US.UTF-8 -
Check terminal encoding:
Terminal window locale# Should show UTF-8 for LC_CTYPE -
Windows PowerShell: UTF-8 output is supported by default in modern PowerShell
Best Practices
Section titled “Best Practices”For Administrators
Section titled “For Administrators”-
Standardize on UTF-8 everywhere:
- Database: UTF8MB4
- RADIUS clients: UTF-8
- LDAP: UTF-8 (default)
-
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
- Create test account with characters like
-
Document encoding configurations:
- Which RADIUS clients use which encoding
- Any legacy devices requiring non-UTF-8
For Users
Section titled “For Users”- Usernames: ASCII-only usernames are most compatible across all devices
- Passwords: Avoid rare Unicode characters; stick to common special characters
- Report issues: Note the exact character causing the problem and the device type
Encoding Configuration Reference
Section titled “Encoding Configuration Reference”RADIUS Client Encoding
Section titled “RADIUS Client Encoding”Configuration: RADIUS Clients → Edit Client → Encoding field
| Option | Description |
|---|---|
| UTF-8 (Recommended) | Supports all characters |
| ISO-8859-1 (Latin-1) | Western European only |
| US-ASCII | Basic Latin only |
| UTF-16 | Rarely needed |
Database Encoding
Section titled “Database Encoding”Recommended: CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci
Troubleshooting Workflow
Section titled “Troubleshooting Workflow”- Identify corrupted characters — Where do they appear? (logs, database, device)
- Check encoding at each layer — RADIUS client, database, terminal
- Test with ASCII-only — If ASCII works, confirms encoding mismatch
- Update encoding — Change to UTF-8 via the RADIUS Clients page
- Test thoroughly — All affected usernames, all device types
Getting Help
Section titled “Getting Help”If encoding issues persist:
- Note the exact character causing the problem
- Document the RADIUS client encoding setting (from RADIUS Clients)
- Note which device/client is affected
- Contact Mideye Support with this information