Well, if it's a UPC, EAN, or GTIN then it has a standard format. Try
searching for those acronyms in Google or Wikipedia. It should be easy
enough to find the international standards for those codes.
So far as I know, UPC's contain no country information. The first set
of digits is assigned to a particular company (perhaps a manufacturer,
perhaps just the distributor or vendor), while the second set of
digits is the product code within that company. While the same set of
initial digits is never shared by more than one company, one company
may have bought multiple sets of initial digits (ours has three, for
example).
I don't know how you would map those iniitial digits back onto the
actual name of a company. Perhaps there's a searchable online database
or, if you're really lucky, a publicly available Web Service you could
call. As well, be aware that companies frequently rebrand products.
Our customers sometimes demand that we place their UPC on a product,
even though we manufactured it. We also sometimes demand that our
suppliers place our UPC on a product, even though we didn't
manufacture it. All the initial digits of the UPC tell you is who
branded the product, not necessarily who really made it.
I know nothing about GTINs, but I'm sure that there is freely
available documentation on the standard. One quick trip to Google
turned up
http://www.gtin.info.
As well, there is
http://www.upcdatabase.com, but it doesn't appear to
be complete.