in reply to Algoritm for converting string to number?
While it is possible to “hash” any string value to produce an integer ... I believe that, by doing so, you would be violating one of the tenets of “normal form,” namely, that identifying-numbers ought not contain any embedded information.
Of course, at least until UPC-codes came along, product identifiers usually did contain a lot of embedded information. (Vehicle Identification Numbers, for example, of course still do.) But these string-values that you speak of are really attributes of the product itself. They don’t belong in a product-code. If you have any say in the matter, counsel against it.
A thing that is good to design into a product code is a check-digit of some kind. The ISBN codes that are used in the publishing industry, as well as credit-card numbers, both include such check digits. But the check digit does not convey any information. Its only purpose is to immediately detect bogus scans.
Whether or not you send this additional “meta data” to the target system, you should keep it. A database, or a database file e.g. SQLite, is an appropriate choice.