<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ahmed Adil Abuzaid</title>
    <description>The latest articles on DEV Community by Ahmed Adil Abuzaid (@ahmedspurs).</description>
    <link>https://dev.to/ahmedspurs</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4262203%2Fe33e26ca-0190-4134-9c72-c87acbdb305b.png</url>
      <title>DEV Community: Ahmed Adil Abuzaid</title>
      <link>https://dev.to/ahmedspurs</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ahmedspurs"/>
    <language>en</language>
    <item>
      <title>How much does a website cost in Saudi Arabia? What really sets the price</title>
      <dc:creator>Ahmed Adil Abuzaid</dc:creator>
      <pubDate>Thu, 26 Nov 2026 07:00:04 +0000</pubDate>
      <link>https://dev.to/ahmedspurs/how-much-does-a-website-cost-in-saudi-arabia-what-really-sets-the-price-3enk</link>
      <guid>https://dev.to/ahmedspurs/how-much-does-a-website-cost-in-saudi-arabia-what-really-sets-the-price-3enk</guid>
      <description>&lt;p&gt;Ask three developers in Riyadh or Al-Khobar to quote "a website" and you may get three numbers that look like they belong to different projects. They often do. "A website" can mean a five-page company profile, or a platform with accounts, payments, a dashboard and an app.&lt;/p&gt;

&lt;p&gt;The fastest way to a fair price is to know what you are actually paying for.&lt;/p&gt;

&lt;h2&gt;
  
  
  The six things that set the price
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. What visitors can do, not how many pages there are.&lt;/strong&gt; A page that only shows text and photos is cheap. A page where people register, book, pay or upload is a feature, and features carry most of the cost.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Who manages the content.&lt;/strong&gt; If your team will update news, events or products without calling a developer, you need an admin dashboard. That is often a project in its own right, and it pays for itself over time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Languages.&lt;/strong&gt; A real Arabic and English site is more than a translation. Layout direction, fonts, search engine tags and every email and message need care in both languages. Plan for it from day one; adding it later costs more.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Integrations.&lt;/strong&gt; Saudi payment gateways, SMS or WhatsApp messages, government or industry systems, a CRM: each connection needs building, testing and someone to own it when the other side changes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Apps.&lt;/strong&gt; A mobile app for iOS and Android adds design, store accounts, reviews and updates. Sometimes a well-built mobile website does the job; sometimes the app is the whole point. More on that in &lt;a href="https://dev.to/website-or-app-first"&gt;website or app first&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Care after launch.&lt;/strong&gt; Hosting, backups, security updates and small improvements are ongoing. A quote that ends on launch day is not the full cost.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to get a quote you can trust
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Write down the goal in one sentence.&lt;/strong&gt; "Members renew online without calling us" is more useful than "a modern website".&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;List the people who will use it.&lt;/strong&gt; Visitors, members, staff, admins. Each group usually means screens and permissions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ask for a written scope.&lt;/strong&gt; A good quote lists what is included, what is not, and what happens when you want changes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ask who owns the code and the server accounts.&lt;/strong&gt; You should.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Compare scopes, not totals.&lt;/strong&gt; The cheaper quote is often missing the dashboard, the second language or the support.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Red flags
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;A fixed price before anyone asked about your users.&lt;/li&gt;
&lt;li&gt;No mention of the admin side, security or backups.&lt;/li&gt;
&lt;li&gt;"We will figure it out during development" for anything that involves payments.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Why do two quotes for the same website differ so much?
&lt;/h3&gt;

&lt;p&gt;Because they usually describe different websites. One may include an admin dashboard, two languages and payment integration; the other may not. Ask both for a written scope and compare line by line.&lt;/p&gt;

&lt;h3&gt;
  
  
  Is a cheaper template site enough?
&lt;/h3&gt;

&lt;p&gt;For a simple company profile, often yes. Once people need to register, pay, book or log in, a custom build is usually safer and cheaper over its lifetime.&lt;/p&gt;

&lt;h3&gt;
  
  
  How long does a website take to build?
&lt;/h3&gt;

&lt;p&gt;It depends on scope. A profile site can take a few weeks; a platform with accounts, payments and a dashboard takes longer and is best delivered in stages.&lt;/p&gt;




&lt;p&gt;Have a project in mind? Describe it to the editor on &lt;a href="https://ahmed-adil.com/#contact" rel="noopener noreferrer"&gt;ahmed-adil.com&lt;/a&gt; and Ahmed will reply with a clear scope and estimate.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://blog.ahmed-adil.com/website-cost-saudi-arabia" rel="noopener noreferrer"&gt;The Supplement&lt;/a&gt;, Ahmed Adil's blog.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>startup</category>
      <category>beginners</category>
    </item>
    <item>
      <title>How we plan a platform before writing the first line of code</title>
      <dc:creator>Ahmed Adil Abuzaid</dc:creator>
      <pubDate>Wed, 25 Nov 2026 07:00:04 +0000</pubDate>
      <link>https://dev.to/ahmedspurs/how-we-plan-a-platform-before-writing-the-first-line-of-code-5g9h</link>
      <guid>https://dev.to/ahmedspurs/how-we-plan-a-platform-before-writing-the-first-line-of-code-5g9h</guid>
      <description>&lt;p&gt;Most projects that go wrong do not fail in the code. They fail in a meeting months earlier, when everyone nodded at a sentence that meant something different to each person.&lt;/p&gt;

&lt;p&gt;So before any code, every project goes through the same five steps.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. One sentence for the goal
&lt;/h2&gt;

&lt;p&gt;Not "a modern platform", but something you can check: "Members renew online in two minutes, and the office stops taking renewal calls." Every later decision is tested against that sentence.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. The people, by name of role
&lt;/h2&gt;

&lt;p&gt;Visitors, members, staff, managers, partners. For each: what do they need to do, on which device, and how often? This list quietly decides the screens, the permissions and the admin dashboard.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. A written scope
&lt;/h2&gt;

&lt;p&gt;A plain document that lists every feature, what is included, and, just as important, what is not included in the first version. It is the contract between "what we imagined" and "what will be delivered". Changes are welcome; they just go through the document first.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. The data, drawn before it is built
&lt;/h2&gt;

&lt;p&gt;What are the things the platform keeps track of (members, events, tickets, bookings) and how do they relate? Drawing this early catches the expensive surprises, and it is also where a good code generator can turn a design into a solid foundation in hours instead of weeks.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. A release plan in stages
&lt;/h2&gt;

&lt;p&gt;Instead of one big launch, the work is cut into stages that each deliver something usable. The client sees real progress every few weeks, gives feedback while it is still cheap to change, and the platform goes live sooner.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where AI fits
&lt;/h2&gt;

&lt;p&gt;AI-assisted development speeds up the building, but only when the plan is clear. A precise scope and data design are exactly what makes generated code reliable and reviewable. Without them, AI just produces the wrong thing faster.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Isn't planning slow?
&lt;/h3&gt;

&lt;p&gt;It is the fastest part of the project. A week of planning routinely saves months of rework.&lt;/p&gt;

&lt;h3&gt;
  
  
  Do we need to know every detail upfront?
&lt;/h3&gt;

&lt;p&gt;No. You need the goal, the users and the first stage clear. Later stages can be planned as you learn.&lt;/p&gt;




&lt;p&gt;Want a plan like this for your idea? Start with the editor on &lt;a href="https://ahmed-adil.com/#contact" rel="noopener noreferrer"&gt;ahmed-adil.com&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://blog.ahmed-adil.com/plan-a-platform-before-writing-code" rel="noopener noreferrer"&gt;The Supplement&lt;/a&gt;, Ahmed Adil's blog.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
    </item>
    <item>
      <title>RTL bugs in Arabic and English websites, and how to fix each one</title>
      <dc:creator>Ahmed Adil Abuzaid</dc:creator>
      <pubDate>Tue, 24 Nov 2026 08:58:43 +0000</pubDate>
      <link>https://dev.to/ahmedspurs/rtl-bugs-in-arabic-and-english-websites-and-how-to-fix-each-one-5hc1</link>
      <guid>https://dev.to/ahmedspurs/rtl-bugs-in-arabic-and-english-websites-and-how-to-fix-each-one-5hc1</guid>
      <description>&lt;p&gt;Building a site in Arabic and English is not "flip it and translate". These are six RTL bugs we have hit in real projects, including on this very site, and what fixed them.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. The page scrolls sideways in Arabic only
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Symptom:&lt;/strong&gt; on a phone, the Arabic page can be dragged left and shows empty space.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cause:&lt;/strong&gt; something sits outside the screen on the "start" side. We found a hidden anti-spam form field positioned with &lt;code&gt;left: -9999px&lt;/code&gt;. In English it hid harmlessly to the left; in Arabic the page grew ten thousand pixels wide.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; hide things without moving them, and clip the page as a safety net.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.visually-hidden&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;absolute&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;overflow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;hidden&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;clip-path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;inset&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="kt"&gt;%&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;html&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nt"&gt;body&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;overflow-x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;clip&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2. Margins on the wrong side
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Cause:&lt;/strong&gt; &lt;code&gt;margin-left&lt;/code&gt;, &lt;code&gt;padding-right&lt;/code&gt; and &lt;code&gt;left:&lt;/code&gt; are physical directions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; use logical properties, which follow the reading direction.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.card&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;margin-inline-start&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;16px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;padding-inline-end&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;12px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;inset-inline-end&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  3. Numbers, emails and code get scrambled
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Symptom:&lt;/strong&gt; &lt;code&gt;+966 53 000 0000&lt;/code&gt; shows up as &lt;code&gt;0000 000 53 966+&lt;/code&gt;, or an email jumps around inside an Arabic sentence.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; isolate left-to-right runs.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;span&lt;/span&gt; &lt;span class="na"&gt;dir&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"ltr"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;+966 53 000 0000&lt;span class="nt"&gt;&amp;lt;/span&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.phone&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nt"&gt;code&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;direction&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;ltr&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;unicode-bidi&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;isolate&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  4. Icons that should flip, and icons that shouldn't
&lt;/h2&gt;

&lt;p&gt;Arrows for "next" and "back" should mirror in Arabic. Play buttons, checkmarks and logos should not. Mirror selectively:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;dir&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"rtl"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="nc"&gt;.icon-arrow&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;scaleX&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;-1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  5. Arabic looks squeezed
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Cause:&lt;/strong&gt; a Latin font with fallback Arabic glyphs, and Latin line height.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; set a real Arabic font for &lt;code&gt;:lang(ar)&lt;/code&gt; and give it more line height.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nt"&gt;root&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;lang&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"ar"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="nt"&gt;body&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;font-family&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Noto Naskh Arabic"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;serif&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;line-height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;1.9&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  6. Search engines see one language
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; give each language its own URL, tell Google they are translations of each other, and set &lt;code&gt;lang&lt;/code&gt; and &lt;code&gt;dir&lt;/code&gt; on the &lt;code&gt;html&lt;/code&gt; element.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;html&lt;/span&gt; &lt;span class="na"&gt;lang&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"ar"&lt;/span&gt; &lt;span class="na"&gt;dir&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"rtl"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"alternate"&lt;/span&gt; &lt;span class="na"&gt;hreflang&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"en"&lt;/span&gt; &lt;span class="na"&gt;href&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"https://example.com/post"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"alternate"&lt;/span&gt; &lt;span class="na"&gt;hreflang&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"ar"&lt;/span&gt; &lt;span class="na"&gt;href&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"https://example.com/ar/post"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Should I build two separate sites?
&lt;/h3&gt;

&lt;p&gt;No. One codebase with logical CSS and translated content is easier to keep in sync. Separate URLs per language are what matter for search.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does Tailwind support RTL?
&lt;/h3&gt;

&lt;p&gt;Yes. Use the logical utilities (&lt;code&gt;ms-*&lt;/code&gt;, &lt;code&gt;me-*&lt;/code&gt;, &lt;code&gt;ps-*&lt;/code&gt;, &lt;code&gt;pe-*&lt;/code&gt;, &lt;code&gt;start-*&lt;/code&gt;, &lt;code&gt;end-*&lt;/code&gt;) instead of left and right.&lt;/p&gt;




&lt;p&gt;Building a bilingual site? Ask the editor on &lt;a href="https://ahmed-adil.com/#contact" rel="noopener noreferrer"&gt;ahmed-adil.com&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://blog.ahmed-adil.com/rtl-bugs-bilingual-websites" rel="noopener noreferrer"&gt;The Supplement&lt;/a&gt;, Ahmed Adil's blog.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>css</category>
      <category>webdev</category>
      <category>debugging</category>
      <category>programming</category>
    </item>
    <item>
      <title>Arabic text turns into ???? in MySQL: the utf8mb4 fix</title>
      <dc:creator>Ahmed Adil Abuzaid</dc:creator>
      <pubDate>Tue, 24 Nov 2026 08:58:33 +0000</pubDate>
      <link>https://dev.to/ahmedspurs/arabic-text-turns-into-in-mysql-the-utf8mb4-fix-2ji6</link>
      <guid>https://dev.to/ahmedspurs/arabic-text-turns-into-in-mysql-the-utf8mb4-fix-2ji6</guid>
      <description>&lt;h2&gt;
  
  
  The symptom
&lt;/h2&gt;

&lt;p&gt;A form saves &lt;code&gt;مرحبا&lt;/code&gt; and the database shows &lt;code&gt;?????&lt;/code&gt;. Or the page shows &lt;code&gt;Ù…Ø±Ø­Ø¨Ø§&lt;/code&gt;. Emoji in names break inserts with &lt;code&gt;Incorrect string value&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The cause
&lt;/h2&gt;

&lt;p&gt;Somewhere between the browser and the disk, a step is not using full UTF-8. In MySQL, the old &lt;code&gt;utf8&lt;/code&gt; charset is really &lt;code&gt;utf8mb3&lt;/code&gt;: it stores up to three bytes per character, so emoji and some symbols fail. If any one layer uses &lt;code&gt;latin1&lt;/code&gt; or &lt;code&gt;utf8mb3&lt;/code&gt;, text gets mangled or replaced with &lt;code&gt;?&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;There are four layers, and all four must agree.&lt;/p&gt;

&lt;h2&gt;
  
  
  The fix
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. The database&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;ALTER&lt;/span&gt; &lt;span class="k"&gt;DATABASE&lt;/span&gt; &lt;span class="n"&gt;app&lt;/span&gt; &lt;span class="kt"&gt;CHARACTER&lt;/span&gt; &lt;span class="k"&gt;SET&lt;/span&gt; &lt;span class="n"&gt;utf8mb4&lt;/span&gt; &lt;span class="k"&gt;COLLATE&lt;/span&gt; &lt;span class="n"&gt;utf8mb4_unicode_ci&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2. Every table&lt;/strong&gt; (existing columns do not change on their own)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;ALTER&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;messages&lt;/span&gt; &lt;span class="no"&gt;CONVERT&lt;/span&gt; &lt;span class="k"&gt;TO&lt;/span&gt; &lt;span class="kt"&gt;CHARACTER&lt;/span&gt; &lt;span class="k"&gt;SET&lt;/span&gt; &lt;span class="n"&gt;utf8mb4&lt;/span&gt; &lt;span class="k"&gt;COLLATE&lt;/span&gt; &lt;span class="n"&gt;utf8mb4_unicode_ci&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create new tables with it explicitly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;posts&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="no"&gt;ENGINE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nc"&gt;InnoDB&lt;/span&gt; &lt;span class="k"&gt;DEFAULT&lt;/span&gt; &lt;span class="no"&gt;CHARSET&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;utf8mb4&lt;/span&gt; &lt;span class="k"&gt;COLLATE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;utf8mb4_unicode_ci&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3. The connection.&lt;/strong&gt; In Node.js with &lt;code&gt;mysql2&lt;/code&gt;, set the charset on the pool:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;mysql&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="s1"&gt;'mysql2/promise'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;pool&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;mysql&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createPool&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;host&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;password&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;database&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;charset&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'utf8mb4'&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;4. Backups and imports.&lt;/strong&gt; Dumps must be read and written with the same charset:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;mysqldump --default-character-set=utf8mb4 app &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; app.sql
mysql --default-character-set=utf8mb4 app &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; app.sql
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Check it
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="no"&gt;SHOW&lt;/span&gt; &lt;span class="no"&gt;VARIABLES&lt;/span&gt; &lt;span class="k"&gt;LIKE&lt;/span&gt; &lt;span class="s1"&gt;'character_set_%'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="no"&gt;TABLE_NAME&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;TABLE_COLLATION&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;information_schema&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;TABLES&lt;/span&gt; &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="no"&gt;TABLE_SCHEMA&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'app'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then insert &lt;code&gt;مرحبا 👋&lt;/code&gt; and read it back. If both survive, every layer is right.&lt;/p&gt;

&lt;h2&gt;
  
  
  Already-broken data
&lt;/h2&gt;

&lt;p&gt;Rows saved as &lt;code&gt;?&lt;/code&gt; are gone; the characters were replaced before they were stored. Rows that look like &lt;code&gt;Ù…Ø±Ø­Ø¨Ø§&lt;/code&gt; were double-encoded and can often be repaired by converting through &lt;code&gt;latin1&lt;/code&gt; and back. Test on a copy first.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  utf8mb4_unicode_ci or utf8mb4_0900_ai_ci?
&lt;/h3&gt;

&lt;p&gt;On MySQL 8, &lt;code&gt;utf8mb4_0900_ai_ci&lt;/code&gt; is the modern default and sorts well. &lt;code&gt;utf8mb4_unicode_ci&lt;/code&gt; works on more versions. Pick one and use it everywhere so joins and comparisons don't complain.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does this affect Arabic search?
&lt;/h3&gt;

&lt;p&gt;Collation decides how text compares and sorts. Both collations above handle Arabic letters; for advanced Arabic search (ignoring diacritics or letter variants) you normalize the text before saving.&lt;/p&gt;




&lt;p&gt;Hit a bug like this in your own project? The editor on &lt;a href="https://ahmed-adil.com/#contact" rel="noopener noreferrer"&gt;ahmed-adil.com&lt;/a&gt; can pass it to Ahmed.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://blog.ahmed-adil.com/mysql-arabic-question-marks-utf8mb4" rel="noopener noreferrer"&gt;The Supplement&lt;/a&gt;, Ahmed Adil's blog.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>mysql</category>
      <category>i18n</category>
      <category>webdev</category>
      <category>debugging</category>
    </item>
  </channel>
</rss>
