• An example of two $(n,M)$ codes that have the same distance enumerator, but not necessarily the same weight enumerator is any two cosets of a $[n,\log_2(n)]$ [n,\log_2(M)]$linear code. Thus, the$(2,2)$codes with codewords${00, 11}$and${01,10}$respectively have the same distance enumerator but not the same weight enumerator. Obviously the codes cannot be equivalent under a permutation of coordinates. • An example of two codes with the same weight enumerator but different distance enumerators is the pair of$(3,3)$codes with codewords${110, 100, 010}$and${110, 100, 001}$respectively. Both have weight enumerator$2z+z^2$but the codes are not equivalent under permutation of coordinates. • An example of inequivalent linear codes with identical weight enumerators (and thus identical distance enumerators) is the$[32,16]$2nd-order Reed-Muller (RM) code and the$[32,16]$extended quadratic residue (QR) code. These codes are not equivalent under permutation of coordinates. The RM code has$155$cosets that have$8$coset leaders of weight$4$while the QR code has no such cosets. In fact, cosets of the QR code that have coset leaders of weight$4$have at most$5$such coset leaders. The details are in Chapter 8 of my unpublished Ph.D. thesis "Weight Enumerators of Reed-Muller Codes and Cosets" Princeton University, 1973. 4 added 416 characters in body As • An example of two$(n,M)$codes that have the same distance enumerator, butnot necessarily the same weight enumerator is any two cosets of a specific$[n,\log_2(n)]$linearcode. Thus, the$(2,2)$codes with codewords${00, 11}$and${01,10}$respectivelyhave the same distance enumerator but not the same weight enumerator. Obviouslythe codes cannot be equivalent under a permutation of coordinates. • An example of two codes with the same weight enumerator but differentdistance enumerators is the pair of$(3,3)$codes with codewords${110, 100, 010}$and${110, 100, 001}$respectively. Both have weight enumerator$2z+z^2$but the codes are not equivalent under permutation of coordinates. • An example of inequivalent linear codes with identical weight enumerators ,thus identical distance enumerators) is (QR) codehave identical weight enumerators but they . These codes are not equivalent under permutation of coordinates. The RM code "Weight Enumerators of Reed-Muller Codes and Cosets" Princeton University, 1973. Note added in response to OP's comment (edited further to fully answer the question):Consider the two$(3,3)$codes with codewords${110, 101, 011}$and${100, 010, 001}$respectively. The different codewords are at distance$2$from each other.However, no permutation ofthe coordinates can transform one code into the other. 3 deleted 305 characters in body As a specific example of inequivalent linear codes with identical weight enumerators, the$[32,16]$2nd-order Reed-Muller (RM) code and the$[32,16]$extended quadratic residue (QR) code have identical weight enumerators but they are not equivalent. The RM code has$155$cosets that have$8$coset leaders of weight$4$while the QR code has no such cosets. In fact, cosets of the QR code that have coset leaders of weight$4$have at most$5$such coset leaders. The details are in Chapter 8 of my unpublished Ph.D. thesis "Weight Enumerators of Reed-Muller Codes and Cosets" Princeton University, 1973. Note added in response to OP's comment (edited further to fully answer the question): Nonlinear codes with identical weight enumerators that are not equivalent under permutation of coordinates can also be exhibited simply. Consider the two$(3,3)$codes with codewords${110, 100101, 010}$011}$ and ${110, 100{100, 010, 001}$ respectivelywith identical weight enumerator . The different codewords are at distance $2z + z^2$2\$ from each other. No However, no permutation of the coordinates can transform one code into the other. Of course, these codes have different distance enumerators and are not really an answer to your question. They only serve to illustrate that identical weight enumerators do not imply equivalence under permutation of coordinates.