title: Arabic digits added to routes using VpnService Builder addRoute("0.0.0.0", 0)
body: <p>When device language is set to Arabic, the app won't connect to VPN. Here is what I found in log:</p>
  
  <pre><code>D/VpnJni: Address added on tun0: 26.26.26.1/24
  E/VpnJni: Invalid route:  0.0.0.0/٠ 8.8.8.8/٣٢
  </code></pre>
  
  <p>Builder constructor has:</p>
  
  <pre><code>.addAddress(String.format(Locale.ENGLISH, PRIVATE_VLAN, "1"), 24)
  </code></pre>
  
  <p>I have to lines with addRoute in my code:</p>
  
  <pre><code>builder.addRoute("0.0.0.0", 0);
  builder.addRoute("8.8.8.8", 32);
  </code></pre>
  
  <p>So I tried to make localized string and convert it to integer:</p>
  
  <pre><code>builder.addRoute("8.8.8.8",  Integer.decode(String.format(Locale.ENGLISH, "%s", "32")));
  </code></pre>
  
  <p>And tried to use NumberFormat and decode integer from it:</p>
  
  <pre><code>NumberFormat nf = NumberFormat.getInstance(Locale.ENGLISH);    
  builder.addRoute("8.8.8.8", Integer.decode(nf.format(32)));
  </code></pre>
  
  <p>But no success! It seems that Builder is ignoring any locale settings for addRoute but addAddress is ok with that. I haven't found any straightforward way to force the app to use exact locale.</p>
  
  <p>Any thoughts? What am I missing here?</p>
  
  <p><strong>EDITED:</strong>
  Based on @joop-eggen answer I thought I can somehow access and change set routes and replace incorrect chars. But there is no such method or whatever to change once it's set. Routes are indeed incorrect as I can see from the debugger:
  <a href="https://i.stack.imgur.com/82gT2.png" rel="nofollow noreferrer">builder instance routes</a></p>