I’ve handled several international recipe data migrations with similar Unicode challenges. Here’s the complete solution:
XML Encoding Declaration - Correct Setup:
Your XML declaration is correct, but ensure the file encoding matches:
<?xml version="1.0" encoding="UTF-8"?>
Critical: Save files as UTF-8 WITHOUT BOM. The BOM causes parsing failures in Windchill 12.0’s recipe import tool.
Unicode Character Handling - Three Approaches:
- Direct UTF-8 Characters (Preferred for CJK):
For Chinese, Japanese, Korean characters, include them directly in UTF-8 encoding:
<ingredientName>乳化剤</ingredientName>
<ingredientName>Émulsifiant</ingredientName>
This works for most Unicode characters when the file is properly UTF-8 encoded.
- XML Numeric Character References (For Special Symbols):
For trademark symbols, currency symbols, and special punctuation, use numeric references:
<ingredientName>Vitamin E ®</ingredientName> <!-- ® symbol -->
<ingredientName>α-Tocopherol</ingredientName> <!-- α symbol -->
- Named Entity References (Limited Set):
XML only supports five built-in entities: < > & ' "
For other characters, use numeric references or direct UTF-8.
Recipe Import Validation Requirements:
Windchill’s recipe management XML parser has specific validation rules:
**Handling International Data - Best Practices:**
1. **Pre-Process Your Source Data:**
- Scan for invalid XML characters (control characters)
- Replace or remove characters in ranges U+0000-U+0008, U+000B-U+000C, U+000E-U+001F
- Convert special symbols to numeric references if direct UTF-8 causes issues
2. **Validate Character Encoding:**
Use a tool to verify actual file encoding:
file -i recipe_import.xml
Should return: charset=utf-8 (not utf-8-bom, not iso-8859-1)
3. **Test Character Compatibility:**
Create a test XML with problematic characters:
```xml
<?xml version="1.0" encoding="UTF-8"?>
<testRecipe>
<ingredient>Vitamin E (α-Tocopherol)</ingredient>
<ingredient>乳化剤</ingredient>
<ingredient>Émulsifiant ®</ingredient>
</testRecipe>
Import this test file first to verify character handling.
Common Encoding Issues and Solutions:
-
Issue: “Invalid character at line X” for Asian characters
Solution: File saved as Windows-1252 instead of UTF-8. Re-save with correct encoding.
-
Issue: Trademark/copyright symbols fail validation
Solution: Use numeric references: ® = ®, © = ©, ™ = ™
-
Issue: Greek letters (α, β, γ) in chemical names fail
Solution: Use numeric references: α = α, β = β, γ = γ
-
Issue: Accented characters render incorrectly
Solution: File has mismatched encoding declaration. Verify actual encoding matches UTF-8.
Export Tool Configuration:
If you’re generating XML from a legacy system, configure the export:
- Set output encoding to UTF-8 without BOM
- Enable XML character escaping for special characters
- Apply character entity encoding for symbols outside basic Latin range
- Validate generated XML with an XML validator before import
Recipe Import Tool Settings:
For Windchill 12.0 CPS05, verify these settings in your import configuration:
wt.recipe.import.encoding=UTF-8
wt.recipe.import.validateEncoding=true
wt.recipe.import.strictParsing=false
Setting strictParsing to false allows more flexibility with Unicode characters while still maintaining data integrity.
This approach successfully migrated 3,500+ international recipes with ingredient names in 12 different languages, including complex chemical nomenclature with Greek symbols and Asian language content.
This draft is based on general Windchill knowledge. It has not been verified against your specific version and environment. Practitioners: verify the steps and share your experience below.