DBCS Function (LibreOffice Calc)
The DBCS function converts half-width (single-byte) characters to full-width (double-byte) characters, primarily for East Asian text processing. It is used in Japanese and Chinese localization workflows.
Compatibility
▾| Excel | ✔ |
| Gnumeric | ✔ |
| Google_sheets | ✖ |
| Libreoffice | ✔ |
| Numbers | ✖ |
| Onlyoffice | ✖ |
| Openoffice | ✔ |
| Wps | ✔ |
| Zoho | ✔ |
What the DBCS Function Does ▾
- Converts ASCII/half-width characters → full-width/double-byte
- Used in East Asian localization workflows
- Affects letters, numbers, and symbols
- Leaves already full-width characters unchanged
Syntax ▾
DBCS(text)
Arguments
- text:
The string to convert to double-byte characters.
Basic Examples ▾
Convert ASCII to full-width
=DBCS("ABC123")
→ "ABC123"
Convert mixed-width text
=DBCS("Test テスト 123")
→ "Test テスト 123"
Convert symbols
=DBCS("!@#")
→ "!@#"
Advanced Examples ▾
Normalize imported CSV data
=DBCS(A1)
Combine with ASC for round-trip conversion
=ASC(DBCS(A1))
Ensure consistent width for sorting
=DBCS(A1) & DBCS(A2)
Validate if text is already full-width
=A1 = DBCS(A1)
Convert user input before lookup
=VLOOKUP(DBCS(A1); DBCS(B1:C100); 2; 0)
Edge Cases and Behavior Details ▾
DBCS returns text
Behavior details
- Only affects characters with half-width/full-width variants
- Does not change kana already in full-width
- Does not convert kanji (they are already double-byte)
- Western locales may show no visible difference
- Useful only in East Asian encoding contexts
Invalid input → treated as text
No error is thrown.
Common Errors and Fixes ▾
“DBCS does nothing”
Cause:
- Locale not using East Asian character sets
- Input contains no convertible characters
Fix:
- Test with ASCII characters like
"ABC123" - Use a Japanese/Chinese font
Lookup mismatch
Cause:
- Mixed-width keys in lookup tables
Fix:
- Normalize both sides with DBCS
Best Practices ▾
- Normalize all lookup keys in East Asian spreadsheets
- Use DBCS for consistent sorting and filtering
- Pair with ASC for reversible conversions
- Apply before text comparison to avoid width mismatches
- Document width normalization in data-cleaning workflows
DBCS is essential when working with Japanese or Chinese datasets where half-width and full-width characters coexist — it ensures consistent, predictable text behavior.
Related Patterns and Alternatives ▾
- ASC — convert full-width → half-width
- LENB / LEFTB / RIGHTB / MIDB — byte-based text functions
- UNICODE / UNICHAR — character-level control
- TEXT normalization workflows — for imported data
By mastering DBCS, you can build robust, localization‑ready text-processing workflows in LibreOffice Calc.