52 questions
0
votes
1
answer
31
views
Which component or layer should be responsible for base36 ID conversion?
I am developing a web application and want to implement base36-encoded IDs for URLs, similar to Reddit's approach (e.g., reddit.com/r/programming/comments/1jkgh2s/ where 1jkgh2s is the base36-encoded ...
1
vote
3
answers
1k
views
How to encode/decode a Uint8Array in Base36 in JavaScript?
I want to encode and decode Bytes from an Uint8Array (or an ArrayBuffer) to/from a string in Base36. JavaScript has the toString and parseInt functions which both support base36 but I am not sure if ...
-3
votes
4
answers
3k
views
How to replace numbers with letters with regular expressions in JavaScript?
I have a string of digits and letters like this:
let cad = "123941A120"
I need to convert that with these substitutions: A = 10, B = 11, C = 12, …, Z = 35.
For example, the string above ...
-1
votes
1
answer
2k
views
Curious about base36 encoding [closed]
I want to base36 encode 128bit hexadecimal number,
but 128bit exceeds the range of the largest number supported by c language.
So, i can't get the value of 36 numbers by finding the remainder and ...
1
vote
0
answers
538
views
How to encode a ByteArray to a base36 String
To encode a ByteArray to Base64 I could simply use Base64 from java.util. But now I need to change my code to create base36
instead. Unfortunately java.util doesn't have this functionality. What I ...
6
votes
3
answers
2k
views
Why JavaScript base-36 conversion appears to be ambiguous
I am currently writing a piece of JavaScript that uses base 36 encoding.
I came across this problem:
parseInt("welcomeback",36).toString(36)
Appears to return "welcomebacg".
I ...
1
vote
1
answer
1k
views
JavaScript: parseInt(string, 36) converts different strings to same number
I have an issue with string conversion:
When using parseInt(string[,radix]) like so:
BigInt(parseInt('something', 36))
it outputs: 80920602611116n. with a different input like so:
BigInt(parseInt('...
-2
votes
2
answers
403
views
Increment string letters and numbers only c#
A similar question was asked here :
Increment a string with both letters and numbers except it increments only the numbers in the string, I want to increment both numbers and letters and only to ...
1
vote
2
answers
2k
views
Convert a DateTime to base36
I'm working with an old database and need to start generating the id using c#.
I need to generate id's that correspond with the old id's.
I'd like to convert a DateTime to a 7 digit \ base36 ...
1
vote
1
answer
117
views
Convert SQL query to C# (SQL query converts base36 code to DateTime)
I'd like to be able to encode \ decode id's containing the datetime in a 7 digit \ base36 configuration, but despite having a SQL query that decodes Id's, so far have had no luck.
I have a SQL query ...
2
votes
1
answer
564
views
Why isn't this Base36 random string using RandomNumberGenerator randomly distributing the characters
I am trying to generate a random Base36 string using C#. I am using RandomNumberGenerator rather than Random as the code needs to be threadsafe. I have the following code setup:
private readonly ...
0
votes
2
answers
1k
views
How do I convert a Float64 to Base36 in Go?
I have say the value 0.36388617850285954, when I use the Javascript .toString(36) function I get the output "0.d3lh1pogpwk". I would like to replicate this in golang however I have no real starting ...
1
vote
1
answer
464
views
Why the result of converting from hex string to base36 string in C++ differs from result of same operation in PHP?
Here is C++ code:
#include <stdio.h>
#include <openssl/sha.h>
#include <string>
#include <gmp.h>
std::string base36enc(std::string data){
mpz_t nr;
mpz_init(nr);
...
0
votes
2
answers
767
views
Modified base36 to base 10 algorithm
I posted a question some time ago about an algorithm that generates 6 character base36 strings from integer numbers. It has the restriction that the first and last character must always be a letter ...
0
votes
1
answer
529
views
How to convert an IBAN to an Integer?
Note, this is not about using libraries or any specific programming language. I just want to understand the following concept, from Wikipedia, Validating the IBAN:
Example (fictitious United Kingdom ...