• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

UPC, EAN, or ISBN

LEGEND ,
Dec 02, 2009 Dec 02, 2009

Copy link to clipboard

Copied

Hello, all.

Does anyone know of a CFC that can take a string and return whether that string is a UPC, an EAN, or an ISBN?

I'm working on a site that adds items to a seller's half.com account (for many sellers) and the product ID that is being supplied could be a UPC, an EAN, or an ISBN (both -10 and -13), and I need to be able to tell half.com which the product ID is.

Thanks,

^_^

Views

1.8K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Dec 03, 2009 Dec 03, 2009

Copy link to clipboard

Copied

UPC, an EAN, or an ISBN (both -10 and -13)

Have you checked cflib.org? I know they have a function for ISBN at least. Also, what type of UPC?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Dec 03, 2009 Dec 03, 2009

Copy link to clipboard

Copied

To expand -==cfSearching==-'s suggestion,

For ISBN,

http://cflib.org/udf/IsISBN

For UPC,

http://cflib.org/index.cfm?event=page.udfbyid&udfid=661

Unfortunately there is no library avaiable for EAN (in CFLIB)., but I hope you can follow the ISBN code from where you can build another library for EAN.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Dec 03, 2009 Dec 03, 2009

Copy link to clipboard

Copied

Unfortunately there is no library avaiable for EAN (in

CFLIB)., but I hope you can follow the ISBN code from where

you can build another library for EAN.

That would be a good addition. But what formats of EAN? There is some overlap between the types you listed. I am not sure you could differentiate between some of them. Not unless the values are formatted. Or perhaps use different check digit calculations.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 03, 2009 Dec 03, 2009

Copy link to clipboard

Copied

cflib.org (which I love) has a script for ISBN-10 that just checks to see if it is a valid ISBN-10; not much for UPC, there, and nothing for EAN.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Dec 04, 2009 Dec 04, 2009

Copy link to clipboard

Copied

At a high level, you could probably determine if a string might be UPC-A, ISBN-10 OR EAN/ISBN-13. IIRC, all of the codes are numeric only. So a simple regex, plus a check digit verification could probably tell you that.

http://en.wikipedia.org/wiki/International_Standard_Book_Number

But again, I am not so sure you can definitively differentiate the value type, using just an un-formatted string of numbers. You might check around for other libraries (even if they are not in CF). That would give you an idea if it is feasible and/or if there is something you could adapt.

-Leigh

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Dec 04, 2009 Dec 04, 2009

Copy link to clipboard

Copied

WolfShade,

I came across this webservice named "GetISBNInformation", through which you can perform the ISBN (or) EAN lookups.

As for UPC,

You can make use of this UDF,

http://cflib.org/index.cfm?event=page.udfbyid&udfid=661

HTH

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Dec 04, 2009 Dec 04, 2009

Copy link to clipboard

Copied

@Daverms

Did you mean to post a url for the webservice?

-Leigh

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Dec 04, 2009 Dec 04, 2009

Copy link to clipboard

Copied

LATEST

Oops.. Sorry,

Here is the URL,

http://www.webservicex.net/isbn.asmx

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation