Encoding (Vietnamese)
The four Encoding commands in the Text and Number group move Vietnamese text between three encodings: Unicode, VNI and TCVN3. The source encoding of each cell is detected from its font name, so you only choose the target.
This comes up constantly when taking over legacy documentation: estimates, specifications and records produced in the .VnTime or VNI-Times era open on a modern machine as gibberish such as C«ng t¸c bª t«ng. Once converted to Unicode the text is searchable, VLOOKUP matches it, and copying into Word or PDF no longer breaks the characters.
Commands in this group
| Command | What it does |
|---|---|
| Encoding | Opens the Convert Font encoding window: target encoding plus a scope wider than the selection |
| To Unicode | Converts the current selection to Unicode and sets the font to Times New Roman |
| To VNI | Converts the current selection to VNI and sets the font to VNI-Times |
| To TCVN3 | Converts the current selection to TCVN3 and sets the font to .VnTime |
The three "To …" buttons act on the highlighted range straight away, with no dialog. The Encoding button opens a window where the scope can be a whole sheet or the whole workbook.
How the source encoding is detected
The add-in reads the current font name of the cell:
- A font starting with
.Vn(.VnTime,.VnArial) → the content is treated as TCVN3. - A font starting with
VNI(VNI-Times,VNI-Helve) → treated as VNI. - Anything else (Times New Roman, Arial, Calibri…) → treated as Unicode.
You therefore never declare the source encoding. The flip side: if somebody changed the font by hand without converting — forcing TCVN3 text into Arial, for instance — the detection is wrong and so is the result. Test a few sample cells before running over a whole sheet.
Bringing a legacy workbook to Unicode
- Keep a copy of the original file. The result overwrites the cells and cannot be undone with Ctrl+Z.
- Check the font of a few garbled cells:
.VnTimeorVNI-Timesconfirms this really is an encoding problem these commands can fix. - Go to tab DVD Addin → group Text and Number → Encoding.
- In the Convert Font encoding window, set:
- Target encoding — Unicode (Times New Roman).
- Scope — Selection, Active sheet or All sheets.
- Keep Skip formula cells ticked so summary formulas survive.
- Click Apply. The window does not lock Excel, so you can select another range and click Apply again; click Close when finished.
- For a small range it is quicker to select it and press To Unicode directly. The status bar reports something like
Converted 128 cells to Uni (font: Times New Roman)and clears itself after about 8 seconds. - Review the layout: the target font is forced (Times New Roman / VNI-Times / .VnTime), so character widths change and you may need to readjust column widths and row heights.
The reverse direction uses the same procedure: when you must submit in a legacy template, pick TCVN3 (.VnTime) or VNI (VNI-Times) as the target.
Example
A refurbishment project's bill of quantities, with the "Work description" column typed in TCVN3 using the .VnTime font. Select the column and click To Unicode:
| Before (.VnTime font) | After (Unicode, Times New Roman) |
|---|---|
C«ng t¸c bª t«ng lãt M100 | Công tác bê tông lót M100 |
Cèt thÐp dÇm sµn D<=10 | Cốt thép dầm sàn D<=10 |
X©y têng g¹ch èng dµy 200 | Xây tường gạch ống dày 200 |
Only after this step can you filter or group by work name, or look the rows up against the unit-price table.
If the client insists on the old VNI template, select the same column and click To VNI: Bê tông móng đá 1x2 M250 becomes Beâ toâng moùng ñaù 1x2 M250 — odd on screen, correct once rendered in VNI-Times.
Tips and caveats
- Formula cells are always skipped by the three "To …" buttons, and the Encoding window ships with Skip formula cells ticked. Unticking it touches formula cells too and easily breaks them.
- The All sheets scope hits the entire open workbook — check before clicking Apply.
- TCVN3 has no full set of accented capitals; all-caps headings usually need manual fixing with the
.VnTimeHfont after conversion. - The recipient's machine must have the matching font installed (
.VnTimefor TCVN3,VNI-Timesfor VNI), otherwise they still see broken text. - After converting to VNI or TCVN3, lookups and comparisons against Unicode data stop matching — leave the encoding change to the very end, once the calculations are done.
- With nothing selected the add-in reports "Please select a data range." and stops.
- Garbled text of the
Cốngkind is not a font-encoding problem but UTF-8 mojibake; fix it with the Fix Vietnamese encoding option in Smart Data Cleaning….
See also
- Smart Data Cleaning — fix mojibake and normalise the data once the encoding is settled.
- Smart Case — normalise capitalisation after the text is Unicode.
- Remove accents — strip diacritics for file names and lookup codes.
- Text Utilities — the other cell-content commands in the same ribbon group.