<?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: GoToolsOnline</title>
    <description>The latest articles on DEV Community by GoToolsOnline (@gotoolsonline).</description>
    <link>https://dev.to/gotoolsonline</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%2F4181505%2Fb92ef66f-f4ff-44cd-9b6a-5f7fb36e5e12.png</url>
      <title>DEV Community: GoToolsOnline</title>
      <link>https://dev.to/gotoolsonline</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/gotoolsonline"/>
    <language>en</language>
    <item>
      <title>6 CSV edge cases that broke my "simple" CSV to JSON converter</title>
      <dc:creator>GoToolsOnline</dc:creator>
      <pubDate>Mon, 19 Oct 2026 07:20:49 +0000</pubDate>
      <link>https://dev.to/gotoolsonline/6-csv-edge-cases-that-broke-my-simple-csv-to-json-converter-4nef</link>
      <guid>https://dev.to/gotoolsonline/6-csv-edge-cases-that-broke-my-simple-csv-to-json-converter-4nef</guid>
      <description>&lt;p&gt;I run a small free tools site, and this week I audited its CSV to JSON converter against what its help text promised. The help text said "RFC 4180" and "auto-detects delimiters". The code split the file on newlines and then on commas. Here is what broke, and what the rewrite does instead.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Line breaks inside quoted fields
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csvs"&gt;&lt;code&gt;&lt;span class="k"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="k"&gt;note&lt;/span&gt;
&lt;span class="k"&gt;Asha&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s2"&gt;"line one
line two"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Splitting on &lt;code&gt;\n&lt;/code&gt; first turns this into three broken rows. The fix is a small state machine that walks characters and only ends a row on a newline that is &lt;em&gt;outside&lt;/em&gt; quotes.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Escaped quotes
&lt;/h2&gt;

&lt;p&gt;In CSV a literal quote inside a quoted field is written twice: &lt;code&gt;"He said ""hi"""&lt;/code&gt;. A parser that just strips the outer quotes leaves you with &lt;code&gt;He said ""hi""&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Spaces inside quotes are data
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;" Mumbai "&lt;/code&gt; should stay &lt;code&gt;" Mumbai "&lt;/code&gt;. The old code trimmed every field, which silently changes values. Only trim when the user asks for it, and never inside quotes.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Not every "CSV" uses commas
&lt;/h2&gt;

&lt;p&gt;European Excel exports often use semicolons; database dumps use tabs or pipes. Auto-detecting is simple if you count candidate delimiters on the first lines &lt;em&gt;while ignoring characters inside quotes&lt;/em&gt;, then let the user override it.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Type conversion should be cautious
&lt;/h2&gt;

&lt;p&gt;Converting &lt;code&gt;"42"&lt;/code&gt; to &lt;code&gt;42&lt;/code&gt; is helpful. Converting a PIN code or employee ID like &lt;code&gt;007&lt;/code&gt; to &lt;code&gt;7&lt;/code&gt; is data loss, and a 20-digit order ID turned into a JavaScript number loses its last digits (anything above 2^53 is not exact). My rule now: numbers only when they round-trip exactly, &lt;code&gt;true&lt;/code&gt;/&lt;code&gt;false&lt;/code&gt;/&lt;code&gt;null&lt;/code&gt; as literals, everything else stays a string.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. An unclosed quote should be an error, not a guess
&lt;/h2&gt;

&lt;p&gt;If the file ends while still inside quotes, the old parser happily swallowed the rest of the file into one cell. Now it reports the problem, because a wrong JSON output that looks fine is worse than an error.&lt;/p&gt;

&lt;h2&gt;
  
  
  The other direction (JSON to CSV)
&lt;/h2&gt;

&lt;p&gt;Two things matter most: nested objects need flattening (&lt;code&gt;user.address.city&lt;/code&gt; as a column) and every field containing the delimiter, a quote, a line break or leading/trailing spaces must be quoted. If the CSV is going into Excel, writing a UTF-8 BOM keeps non-English text from turning into mojibake.&lt;/p&gt;

&lt;h2&gt;
  
  
  Takeaway
&lt;/h2&gt;

&lt;p&gt;CSV looks trivial until real files arrive. If your tool's description promises a standard, write a test file for each edge case above and run it before you ship.&lt;/p&gt;

&lt;p&gt;Disclosure: the converters I rewrote are on my site, GoToolsOnline. Both run in the browser, so the data isn't uploaded: &lt;a href="https://gotoolsonline.com/tools/csv-to-json" rel="noopener noreferrer"&gt;https://gotoolsonline.com/tools/csv-to-json&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>csv</category>
      <category>json</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How to convert CGPA to percentage (and why the 9.5 rule isn't universal)</title>
      <dc:creator>GoToolsOnline</dc:creator>
      <pubDate>Tue, 13 Oct 2026 07:57:04 +0000</pubDate>
      <link>https://dev.to/gotoolsonline/how-to-convert-cgpa-to-percentage-and-why-the-95-rule-isnt-universal-jd4</link>
      <guid>https://dev.to/gotoolsonline/how-to-convert-cgpa-to-percentage-and-why-the-95-rule-isnt-universal-jd4</guid>
      <description>&lt;p&gt;Many students need to convert a CGPA into a percentage for job applications, scholarship forms, or further study. The conversion looks simple, but the right formula depends on which body issued your grade sheet.&lt;/p&gt;

&lt;h2&gt;
  
  
  The commonly cited formula
&lt;/h2&gt;

&lt;p&gt;For CBSE results, the formula most often quoted is:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;percentage = CGPA x 9.5&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Worked example: a CGPA of 8.2 gives 8.2 x 9.5 = &lt;strong&gt;77.9%&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The 9.5 rule isn't universal
&lt;/h2&gt;

&lt;p&gt;The 9.5 factor is a CBSE convention. Many universities publish their own conversion formula, and the factor can be different. Anna University, VTU (Visvesvaraya Technological University) and Mumbai University each publish their own rules, so a figure calculated with 9.5 may not match what your university expects.&lt;/p&gt;

&lt;p&gt;Before you convert anything, check:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The conversion rule on your university's website, result notice, or FAQ.&lt;/li&gt;
&lt;li&gt;Whether your university issues a conversion letter or states a percentage on your transcript.&lt;/li&gt;
&lt;li&gt;What the receiving organisation asks for. Some forms accept the university's document; others ask you to state the formula you used.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Averaging SGPA into CGPA: weight by credits
&lt;/h2&gt;

&lt;p&gt;If you only have semester SGPA values, your overall CGPA is usually a credit-weighted average, not a simple average:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CGPA = (sum of SGPA x credits) / (sum of credits)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Example: Semester 1 has SGPA 8.0 for 20 credits, and Semester 2 has SGPA 7.5 for 24 credits.&lt;/p&gt;

&lt;p&gt;(8.0 x 20 + 7.5 x 24) / (20 + 24) = 340 / 44 = about 7.73&lt;/p&gt;

&lt;h2&gt;
  
  
  Quick tips
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Use the credit totals from your university's scheme, not the number of subjects.&lt;/li&gt;
&lt;li&gt;Keep the decimal places your university uses, and round only at the end.&lt;/li&gt;
&lt;li&gt;Check whether repeated or cleared subjects count toward the credit total under your rules.&lt;/li&gt;
&lt;li&gt;Keep the official document with your calculation when you submit a form.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Disclosure: I run GoToolsOnline, which has a free no-signup calculator for this: &lt;a href="https://gotoolsonline.com/tools/cgpa-to-percentage" rel="noopener noreferrer"&gt;https://gotoolsonline.com/tools/cgpa-to-percentage&lt;/a&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>productivity</category>
      <category>tools</category>
      <category>education</category>
    </item>
  </channel>
</rss>
