-
Notifications
You must be signed in to change notification settings - Fork 8.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unicode Bangla text not rendering properly in Windows Terminal console #18571
Comments
It seems to me that this is hardly possible without special tailoring of text data and using a terminal emulator that supports such tailoring. Since it is not yet possible to create a monospace font for abugida scripts like Devanagari/Bengali/etc. By "tailoring" I mean placing character geometry modifiers inside the source text in order to specify explicit sizes of grapheme clusters to the terminal. See Unicode Character Geometry Modifiers for details. Here is an example of "tailored" news2.json:[
{
"title": "�সাগর-রুনি �হত্যা: �নিরাপত্তাকর্মীকে �কারা �ফটকে �জিজ্ঞাসাবাদ",
"link": "https://www.prothomalo.com/bangladesh/ksfmm5h342"
},
{
"title": "�বছরে �আয় �৩১৫০ �কোটি �টাকা, �আবারও �বিশ্বের �সবচেয়ে �বেশি �আয়ের �অ্যাথলেট �ক্রিস্টিয়ানো �রোনালদো",
"link": "https://www.prothomalo.com/sports/football/b4uf56g5y6"
},
{
"title": "�মোটরযানের �গতিসীমা �নির্দেশিকার �বাস্তবায়ন �চায় �রোড �সেফটি �কোয়ালিশন",
"link": "https://www.prothomalo.com/bangladesh/r9lmm4kczo"
},
{
"title": "�জাতিসংঘের �প্রতিবেদন �ট্রাইব্যুনালে �অকাট্য �দলিল �হিসেবে �ব্যবহার �করা �যাবে: �চিফ �প্রসিকিউটর",
"link": "https://www.prothomalo.com/bangladesh/zu65htd5rd"
},
{
"title": "৫ �আগস্টের ‘�মার্চ �অন �ঢাকা’ �ঠেকাতে �যেভাবে �পরিকল্পনা �করেছিল �হাসিনা �সরকার",
"link": "https://www.prothomalo.com/bangladesh/f8x2ud35t3"
},
{
"title": "�শান্ত-মারিয়াম �ফাউন্ডেশন �ডে �উদ্যাপন",
"link": "https://www.prothomalo.com/education/campus/y2e1oqab76"
},
{
"title": "�যুক্তরাষ্ট্রের �জাতীয় �গোয়েন্দা �প্রধান �হলেন �তুলসী �গ্যাবার্ড",
"link": "https://www.prothomalo.com/video/international/55zuoow5co"
},
{
"title": "�ন্যূনতম �সংস্কার �কর্মসূচির �একটি �নকশা",
"link": "https://www.prothomalo.com/opinion/column/hdmqrmrbm3"
},
{
"title": "�ধামরাইয়ে �বিনোদনকেন্দ্রের �কর্মীদের �সঙ্গে �শিক্ষার্থীদের �সংঘর্ষের �ঘটনায় �মামলা",
"link": "https://www.prothomalo.com/bangladesh/district/azghc2wcg3"
},
{
"title": "�মাকে �নিয়ে �মজার �ঘটনা",
"link": "https://www.prothomalo.com/other/ks01wwijtp"
},
{
"title": "�জাহাঙ্গীরনগরে �সি �ইউনিটের �ভর্তি �পরীক্ষা �শুরু, �আসনপ্রতি �পরীক্ষার্থী �১২১",
"link": "https://www.prothomalo.com/education/examination/fac92k5hwq"
},
{
"title": "�জাতীয় �ঐকমত্য �কমিশন �গঠন, �সভাপতি �অধ্যাপক �ইউনূস",
"link": "https://www.prothomalo.com/bangladesh/o8jo54zlmv"
},
{
"title": "�কন্যাসন্তান �নিয়ে �বিতর্কিত �মন্তব্য �করে �বিপদে �চিরঞ্জীবী",
"link": "https://www.prothomalo.com/entertainment/bollywood/344j4pvcez"
},
{
"title": "�লোকজ �উৎসবে �নারায়ণগঞ্জ �বন্ধুসভার �মূকাভিনয় �প্রদর্শন",
"link": "https://www.prothomalo.com/activities/nnz22sg2r9"
},
{
"title": "�গাজীপুরে �কাশেমের �জানাজায় �আওয়ামী �লীগ �নিষিদ্ধের �দাবি",
"link": "https://www.prothomalo.com/bangladesh/district/3dna5uwiap"
},
{
"title": "�বসন্তের �আমেজে �ফুলে �ফুলে �তারকারা",
"link": "https://www.prothomalo.com/celeb/look/8scw6wllfs"
},
{
"title": "�সংস্কার �ছাড়া �নির্বাচন �নয়: �জামায়াতে �ইসলামী",
"link": "https://www.prothomalo.com/politics/lnvdeecjtk"
},
{
"title": "�মহারাষ্ট্রের �সাবেক �মন্ত্রীর �ব্যাংককগামী �ছেলেকে �ঘিরে �মাঝ �আকাশে �নাটকীয়তা",
"link": "https://www.prothomalo.com/world/india/6sz6q4ln4r"
},
{
"title": "�আজকের �বিনিময় �হার",
"link": "https://www.prothomalo.com/business/sx6znkk8sk"
},
{
"title": "�ডিস্ক �প্রলাপস �কেন �হয়, �সতর্কতা ও �চিকিৎসা �কী",
"link": "https://www.prothomalo.com/lifestyle/health/0g2c16pw8n"
}
] Here is the output result: pwsh.2025-02-13.18-04-58.mp4Note, WT doesn't currently support output this way, maybe this example will enlighten someone to a better approach. For now it only works in vtm. Key Unicode codepoints:
Samples for powershell: "`u{2}টার্মিনাল`u{d003c}"
"`u{2}এমুলেটর`u{d0049}" It is also worth noting that Write-Output in powershell incorrectly calculates the length of such lines: |
@memamun Can you please first update to the latest version 1.22? It has a new Unicode implementation. If the update is not showing up for you, you can download it directly here: https://github.com/microsoft/terminal/releases/download/v1.22.10352.0/Microsoft.WindowsTerminal_1.22.10352.0_8wekyb3d8bbwe.msixbundle You'll notice that it works, because it'll break PowerShell: ...but that's a PowerShell bug, because they don't support grapheme clusters. |
Windows Terminal version
1.21.10351.0
Windows build number
10.0.19045.0
Other Software
PowerShell 7.4.6
Steps to reproduce
Steps to reproduce
news.json
with UTF-8 encoding containing Bangla text (see code snippet below).$OutputEncoding = [System.Text.Encoding]::UTF8
Get-Content -Path .\news.json -Raw | ConvertFrom-Json
Download the File: news.json
Expected Behavior
Bangla characters should render correctly, as they do in text editors or web browsers using the same font.
Actual Behavior
Bangla characters are garbled (see screenshot attached).
Description of the issue:
Bengali characters are not rendering correctly in Windows Terminal when displaying any Bengali text output on windows terminal.
I have tried Setting $OutputEncoding to UTF-8 and changing different font but not working.
Please see the attached screenshot for reference.
Please fix this issue. We(Bangladeshi) need this in the moth of Language (February).
I appreciate your effort to fix the bug. Thank you.
The text was updated successfully, but these errors were encountered: